I have two projects those are 1. Web Project 2. Broker Project
services
-web/util.go
-main.go
-cofig.json
broker
-consumer/redis.go
-consumer/mongo.go
-main.go
-<cofig.go> //I do not want to make a copy here
I have developed an utility program for my web project which uses config.json file. In that utility program I use the code like
file, _ := os.Open("./config.json")
That is working fine. When I included this project into Broker project like
package "services/web"
And I tried to utilize utility code in it but it tries to find 'config.json' from Broker project instead of "services web project". Due to this reason I need to copy the same file inside the Broker project.
Please help me to keep single file inside 'services/web'
Thanks is advance.
Regards, Dinesh