Last change
on this file since 55 was 55, checked in by yakumo.izuru, 17 months ago |
「swagger」サポートを削除し、あちこちのバグを修正
|
File size:
442 bytes
|
Line | |
---|
1 | // Read the INI-style configuration file
|
---|
2 | package main
|
---|
3 |
|
---|
4 | import (
|
---|
5 | "gopkg.in/ini.v1"
|
---|
6 | )
|
---|
7 |
|
---|
8 | func 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.