On Sat, 14 Jan 2017 08:03:45 -0800 (PST)
buc...@gmail.com wrote:

> Rankest beginner here.  Trying to learn Go by converting an old
> Visual Basic application to Go (yeah, right) on Windows 10 (got all
> the database stuff working with both postgre and sqlite!)  The
> application needs to read an .ini file to get path/filename.  It
> bombs on the first line.

I would recommend [1] and [2].  Successfully using both in production.

I like [1] because it's very simple and well engeneered at the same
time.  The upstream author was responsive and helpful as well when I
chimed in his bugtracker.

gcfg has an advantage of supporting some level of hierarchy by allowing
you to have named groups of settings (which have the same "shape").

Obviously, more hard-core solution exist, such as a TOML parsing
package (which, as I heard is a very good shape) and YAML parsers.
Stock Go is also able to parse XML and JSON.

Still, for my personal needs those two packages provided the minimal
amount of functionality to feel not overwhelmed, so I like them.

1. https://github.com/Thomasdezeeuw/ini
2. https://gopkg.in/gcfg.v1

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to