2019-11-02 20:03:45 -07:00
|
|
|
# INI
|
|
|
|
|
|
2020-03-28 14:26:37 +08:00
|
|
|
[](https://github.com/go-ini/ini/actions?query=workflow%3AGo)
|
2020-03-21 10:56:07 +08:00
|
|
|
[](https://codecov.io/gh/go-ini/ini)
|
2020-03-28 14:26:37 +08:00
|
|
|
[](https://pkg.go.dev/github.com/go-ini/ini?tab=doc)
|
2020-03-21 10:56:07 +08:00
|
|
|
[](https://sourcegraph.com/github.com/go-ini/ini)
|
2014-12-18 02:36:54 -05:00
|
|
|
|
2015-09-12 17:07:54 -04:00
|
|
|

|
|
|
|
|
|
2014-12-18 02:36:54 -05:00
|
|
|
Package ini provides INI file read and write functionality in Go.
|
|
|
|
|
|
2018-03-13 11:19:27 -04:00
|
|
|
## Features
|
2014-12-18 02:36:54 -05:00
|
|
|
|
2020-03-07 14:18:40 +08:00
|
|
|
- Load from multiple data sources(file, `[]byte`, `io.Reader` and `io.ReadCloser`) with overwrites.
|
2014-12-18 02:36:54 -05:00
|
|
|
- Read with recursion values.
|
2014-12-23 02:09:39 -05:00
|
|
|
- Read with parent-child sections.
|
2014-12-18 02:36:54 -05:00
|
|
|
- Read with auto-increment key names.
|
|
|
|
|
- Read with multiple-line values.
|
|
|
|
|
- Read with tons of helper methods.
|
|
|
|
|
- Read and convert values to Go types.
|
|
|
|
|
- Read and **WRITE** comments of sections and keys.
|
|
|
|
|
- Manipulate sections, keys and comments with ease.
|
|
|
|
|
- Keep sections and keys in order as you parse and save.
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
2018-09-10 15:25:51 -04:00
|
|
|
The minimum requirement of Go is **1.6**.
|
|
|
|
|
|
2018-03-13 11:19:27 -04:00
|
|
|
```sh
|
|
|
|
|
$ go get gopkg.in/ini.v1
|
|
|
|
|
```
|
2014-12-18 02:36:54 -05:00
|
|
|
|
2016-02-07 11:33:30 -05:00
|
|
|
Please add `-u` flag to update in the future.
|
|
|
|
|
|
2014-12-18 02:36:54 -05:00
|
|
|
## Getting Help
|
|
|
|
|
|
2018-03-13 11:19:27 -04:00
|
|
|
- [Getting Started](https://ini.unknwon.io/docs/intro/getting_started)
|
2014-12-30 10:53:01 +08:00
|
|
|
- [API Documentation](https://gowalker.org/gopkg.in/ini.v1)
|
2020-04-18 16:08:56 +08:00
|
|
|
- 中国大陆镜像:https://ini.unknwon.cn
|
2014-12-18 02:44:24 -05:00
|
|
|
|
2014-12-18 02:36:54 -05:00
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text.
|