// Read the INI-style configuration file package main import ( "gopkg.in/ini.v1" ) func readConf(file string) error { cfg, err := ini.Load(file) if err != nil { return err } conf.listen = cfg.Section("simplytranslate").Key("listen").String() conf.staticpath = cfg.Section("simplytranslate").Key("rootdir").String() conf.tmplpath = cfg.Section("simplytranslate").Key("tmplpath").String() return nil }