source: code/trunk/cmd/simplytranslate/readconf.go@ 55

Last change on this file since 55 was 55, checked in by yakumo.izuru, 17 months ago

「swagger」サポートを削除し、あちこちのバグを修正

File size: 442 bytes
RevLine 
[55]1// Read the INI-style configuration file
2package main
3
4import (
5 "gopkg.in/ini.v1"
6)
7
8func readConf(file string) error {
9 cfg, err := ini.Load(file)
10 if err != nil {
11 return err
12 }
13
14 conf.listen = cfg.Section("simplytranslate").Key("listen").String()
15 conf.staticpath = cfg.Section("simplytranslate").Key("rootdir").String()
16 conf.tmplpath = cfg.Section("simplytranslate").Key("tmplpath").String()
17
18 return nil
19}
20
Note: See TracBrowser for help on using the repository browser.