From ae897e110674c7242959d41d6b8327c47dbd9616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=B8=85=E4=BD=A0=E6=8A=A5=E8=AD=A6?= Date: Sat, 30 Oct 2021 20:34:02 +0800 Subject: [PATCH] aaa --- global/conf.go | 2 +- pkg/conf/conf.go | 2 +- pkg/util/path.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global/conf.go b/global/conf.go index 44663237..ff6dc8ae 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 8480cf66..af5199b7 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 16137bf0..739150ba 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 {