As we deploy more and more go programs we noticed a lot of boiler plate code showing up.
Also being mainly rails developers we like to have different environments for development, testing and production.
Another requirement is the configuration of any database connection through a
To address the issues mentioned and to make setting up a new go program easier i build this package.
what does it do?
- use rails style
- default write
- enable usage of
- provide many useful startup flags [config, log, etc.]
how to use it?
Very easy, just install with
go get github.com/adeven/go_conf
and import it
and then just use it
config/database.yml would look something like
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Now you can start you program like
go run main.go --config confg/mydb.yml --log log/development.log
I hope this package is as useful to you as it is to us.