While reading your comment, I thought of the problems with configuration files I was having in my own project... when I realized, "why not just use python"?
The program (written in go) could simply launch a new process on startup, e.g.
python -c "import imp; c = imp.load_source('c', 'abc.conf'); print '\n'.join('%s = %s' % (n, repr(getattr(c, n))) for n in ['option1', 'option2', 'option3'])"
and read it's output (which could also be another well-known format, like JSON) and use it for configuration. Simple, elegant, and enables very powerful abstractions.
The program (written in go) could simply launch a new process on startup, e.g.
and read it's output (which could also be another well-known format, like JSON) and use it for configuration. Simple, elegant, and enables very powerful abstractions.