「swagger」サポートを削除し、あちこちのバグを修正
git-svn-id: file:///srv/svn/repo/mai/trunk@55 e410bdd4-646f-c54f-a7ce-fffcc4f439ae
This commit is contained in:
20
cmd/simplytranslate/readconf.go
Normal file
20
cmd/simplytranslate/readconf.go
Normal file
@@ -0,0 +1,20 @@
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user