From 03a9795ae268030a1be9fa643731d21ca729810c Mon Sep 17 00:00:00 2001 From: zu1k Date: Sat, 22 Aug 2020 15:30:19 +0800 Subject: [PATCH] show config file --- internal/app/task.go | 2 ++ main.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/app/task.go b/internal/app/task.go index 3a1172c..5fe2cb9 100644 --- a/internal/app/task.go +++ b/internal/app/task.go @@ -71,6 +71,8 @@ func FetchNewConfigFileThenInit() { defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) + fmt.Println(string(body)) + err = yaml.Unmarshal(body, &config.SourceConfig) if err != nil { return diff --git a/main.go b/main.go index 4a41fed..08707cd 100644 --- a/main.go +++ b/main.go @@ -52,10 +52,10 @@ func main() { } func initConfigFile(path string) { + fmt.Println("Config file:", path) if strings.HasPrefix(path, "http") { config.Url = path config.NeedFetch = true - app.FetchNewConfigFileThenInit() } else { err := app.InitConfigAndGetters(configFilePath) if err != nil {