From 7805b55b51f6d5e6788ca6d5f2261b46c691f17e Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 3 Jul 2018 09:57:07 +0200 Subject: [PATCH] Fix: Write default config to right location Signed-off-by: Knut Ahlers --- config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.go b/config.go index 0f82fc1..e18991e 100644 --- a/config.go +++ b/config.go @@ -21,7 +21,8 @@ func loadConfig() (*configFile, error) { return nil, errors.New("Config file does not exist, use --create-config to create one") } - if err = yaml.Unmarshal(MustAsset("assets/git_changerelease.yaml"), &config); err != nil { + c := &configFile{} + if err = yaml.Unmarshal(MustAsset("assets/git_changerelease.yaml"), c); err != nil { return nil, err } @@ -31,6 +32,5 @@ func loadConfig() (*configFile, error) { } defer dataFile.Close() - c := &configFile{} return c, yaml.NewDecoder(dataFile).Decode(c) }