From a2fe341cb83849e2fb2d64bf3576a72652787ddf Mon Sep 17 00:00:00 2001 From: apple <2571583272@qq.com> Date: Tue, 12 Dec 2017 19:07:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9init=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 3 ++- main.go | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 069d961e..895c3edf 100644 --- a/config/config.go +++ b/config/config.go @@ -26,7 +26,8 @@ type PCSConfig struct { MaxParallel int `json:"max_parallel"` } -func init() { +// Init 初始化配置 +func Init() { // 检查配置 cfg, err := loadConfig() if err != nil { diff --git a/main.go b/main.go index 4ed634f7..19f47e80 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,8 @@ func init() { } } os.Chdir(folderPath) + + pcsconfig.Init() } func main() {