pull/1037/head
不帅你报警 4 years ago
parent d1038c6764
commit ae897e1106

@ -1,3 +1,3 @@
package global package global
var conf map[string]interface{} var Conf map[string]interface{}

@ -149,7 +149,7 @@ func Init(path string) {
util.Log() util.Log()
} }
global.conf := sections global.Conf := sections
} }
// mapSection 将配置文件的 Section 映射到结构体上 // mapSection 将配置文件的 Section 映射到结构体上

@ -63,7 +63,7 @@ func RelativePath(name string) string {
if filepath.IsAbs(name) { if filepath.IsAbs(name) {
return name return name
} }
SystemConfig, ok := global.conf[ "SystemConfig" ] SystemConfig, ok := global.Conf[ "SystemConfig" ]
if SystemConfig.DataPath != "" { if SystemConfig.DataPath != "" {
return filepath.Join(SystemConfig.DataPath, name) return filepath.Join(SystemConfig.DataPath, name)
} else { } else {

Loading…
Cancel
Save