8000 GitHub - vmpartner/ini: Package ini provides INI file read and write functionality in Go.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ ini Public
forked from go-ini/ini

Package ini provides INI file read and write functionality in Go.

Notifications You must be signed in to change notification settings

vmpartner/ini

 
 

Repository files navigation

Config ini

Usage:

# possible values : production, development
app_mode = development

[paths]
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
data = /home/git/grafana

[server]
# Protocol (http or https)
protocol = http

# The http port  to use
http_port = 9999

# Redirect to correct domain if host header does not match domain
# Prevents DNS rebinding attacks
enforce_domain = true
import "github.com/vmpartner/ini"

func main() {
    config, err := ini.Load("my.ini")
    if err != nil {
        fmt.Printf("Fail to read file: %v", err)
        os.Exit(1)
    }
    protocol := config.Section("server").Key("protocol").String()
}

Source: https://ini.unknwon.io/

About

Package ini provides INI file read and write functionality in Go.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%
0