# go-ini

> Read and write INI files in Go

Source: https://talira.ai/catalog/go-ini-x4a3w2ap
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / configuration](https://talira.ai/categories/libraries/configuration), [languages / go](https://talira.ai/categories/languages/go)
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [Joe Chen](https://talira.ai/orgs/unknwon.md)

go-ini (package `ini`) is Joe Chen's Go library for reading and writing INI files. It loads from files, byte slices and readers, with later sources overriding earlier ones, and supports a rich INI syntax: parent-child sections, auto-increment and repeated (shadow) keys, nested and multiline values and `%(name)s` references. Values are read as numbers, booleans, durations, times and lists, and structs map to and from files through `ini` struct tags. Version 2 (in beta, at `unknwon.dev/ini/v2`) adds a single-pass lexer up to 37 times faster than v1, writes that keep comments and order, parse errors with line and column, and safe concurrent use; v1 is `gopkg.in/ini.v1`.

## Links

- Website: https://ini.unknwon.io/
- GitHub: https://github.com/go-ini/ini
- Docs: https://ini.unknwon.io/

## Problems it solves

- read an INI config file in my Go program
- map an INI file onto a Go struct
- edit an INI file from Go without losing its comments

## Features

- load from files, byte slices and readers, with overrides
- parent-child sections, shadow keys, multiline values and references
- typed values: numbers, booleans, durations, times and lists
- map structs to and from INI files with struct tags
- v2: writes that keep comments and order, and line and column in errors

## Trust

Overall: 0.56 out of 1.
Signals: maintenance 0.73, adoption 0.71, momentum 0.43, community 0.73, backing 0.30, extensibility 0.00.

- last commit 11 days ago
- 19 commits in the last 90 days
- latest release v1.68.0 18 days ago
- 3.5k GitHub stars
- 67 contributors
- backed by Joe Chen

## Alternatives

- [Viper](https://talira.ai/catalog/viper-mtps383e.md): Configuration for Go applications from files, environment variables, flags and remote stores
- [godotenv](https://talira.ai/catalog/godotenv-1xnh3749.md): Loads environment variables from .env files in Go

## Sources

[^1]: https://github.com/go-ini/ini/blob/main/LICENSE (checked 28 Nov 2026)
