diff --git a/global/conf.go b/global/conf.go index 4466323..ff6dc8a 100644 --- a/global/conf.go +++ b/global/conf.go @@ -1,3 +1,3 @@ package global -var conf map[string]interface{} +var Conf map[string]interface{} diff --git a/pkg/conf/conf.go b/pkg/conf/conf.go index 8480cf6..af5199b 100644 --- a/pkg/conf/conf.go +++ b/pkg/conf/conf.go @@ -149,7 +149,7 @@ func Init(path string) { util.Log() } - global.conf := sections + global.Conf := sections } // mapSection 将配置文件的 Section 映射到结构体上 diff --git a/pkg/util/path.go b/pkg/util/path.go index 16137bf..739150b 100644 --- a/pkg/util/path.go +++ b/pkg/util/path.go @@ -63,7 +63,7 @@ func RelativePath(name string) string { if filepath.IsAbs(name) { return name } - SystemConfig, ok := global.conf[ "SystemConfig" ] + SystemConfig, ok := global.Conf[ "SystemConfig" ] if SystemConfig.DataPath != "" { return filepath.Join(SystemConfig.DataPath, name) } else {