In an effort to make changes easier, create a separate main.go which will be a produce a binary that can change a particular configuration setting depending on what flag is specified.
So theoretically you would be able to run someBinary -port 35000 and that would go into the config.json file and change the port.
Currently
config.json
has the following structure:In an effort to make changes easier, create a separate
main.go
which will be a produce a binary that can change a particular configuration setting depending on what flag is specified.So theoretically you would be able to run
someBinary -port 35000
and that would go into theconfig.json
file and change the port.Resource: https://golang.org/pkg/flag/