finds.dev

unknwon/goconfig

Package goconfig is a fully functional and comments-support configuration file (.ini) parser.

View on GitHub

★ 604GoApache-2.0updated Sep 2024

// the take

goconfig is a Go INI file parser that supports reading and writing comments alongside key/value pairs, which most of the alternatives drop on save. It's aimed at anyone who needs Windows-style INI config with round-trip fidelity, not just read-only parsing.

Comment-preserving read/write is a real differentiator — most Go INI libraries strip comments on SaveConfigFile, this one doesn't. Recursive sections and DEFAULT-section value interpolation cover the actual INI spec instead of a simplified subset. The Must* accessor pattern (MustInt, MustBool, etc.) with optional default values is a clean way to avoid error-checking boilerplate for config reads where a sane fallback is fine.

The README states it's in bug-fix-only mode and the author has moved on to go-ini/ini — you're adopting a dead-end library on day one. No struct tag/marshaling support, so you're stuck with GetValue/SetValue string-keyed access instead of binding into typed config structs like viper or go-ini offer. Last push was a year ago with no releases/tags visible in the tree, and CASE SENSITIVE keys being called out as a gotcha in the README is a sign of rough edges rather than a deliberate design choice.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
604
Forks
146
Language
Go
License
Apache-2.0
Last commit
1 Sep 2024

// nearby

If goconfig isn't quite it.

All repos →