Installation

You must have Go installed properly on your machine with correct $GOPATH setup.

Download the package

To use a tagged revision:

  1. $ go get gopkg.in/ini.v1

To use with latest changes:

  1. $ go get github.com/go-ini/ini

Please add -u flag to update in the future.

Testing

If you want to test on your machine, please apply -t flag:

  1. $ go get -t gopkg.in/ini.v1

Please add -u flag to update in the future.

Running tests on your local machine

Go to the directory of the package and execute make test command (replace import path as needed):

  1. $ cd $GOPATH/src/gopkg.in/ini.v1
  2. $ make test
  3. go test -v -cover -race
  4. === RUN Test_Version
  5. Get version
  6. 1 total assertion
  7. --- PASS: Test_Version (0.00s)
  8. === RUN Test_isSlice
  9. Check if a string is in the slice ✔✔
  10. 3 total assertions
  11. --- PASS: Test_isSlice (0.00s)
  12. === RUN TestEmpty
  13. ...
  14. --- PASS: Test_Duration (0.00s)
  15. PASS
  16. coverage: 94.3% of statements
  17. ok gopkg.in/ini.v1 1.121s

原文: https://ini.unknwon.io/docs/intro/installation