go-ini

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2016 License: BSD-3-Clause

README

Package ini provides INI file read functionality in Go.

Installation

To get the latest changes

go get github.com/cuberat/go-ini/ini

Getting started

File:

foo=bar
[db]
user=myuser
password=mypassword

Code:

import (
    "fmt"
    "github.com/cuberat/go-ini/ini"
)

conf, err := ini.LoadFromFile("my/file/path.conf")
fmt.Printf("%v\n", conf)

Output:

map[default:map[foo:bar] db:map[user:myuser password:mypassword]]

Note that fields that occur before a section is declared are placed into a section called "default".

Directories

Path Synopsis
Package ini provides INI file read functionality in Go.
Package ini provides INI file read functionality in Go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL