From 2049698c8e30de398f13fa20d0b156ee6700d245 Mon Sep 17 00:00:00 2001 From: Will Ledingham Date: Tue, 30 Jul 2019 16:37:24 -0400 Subject: [PATCH] small edit --- pkg/config/config.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index d24672dd..6d79bcad 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -119,16 +119,13 @@ func ParseFile(path string) (Configuration, error) { configBox := packr.New("Config", "../../examples") if path == "" { rawBytes, err = configBox.Find("config.yaml") - if err != nil { - return Configuration{}, err - } } else if strings.HasPrefix(path, "https://") || strings.HasPrefix(path, "http://") { //path is a url response, err := http.Get(path) + rawBytes, err = ioutil.ReadAll(response.Body) if err != nil { return Configuration{}, err } - rawBytes, err = ioutil.ReadAll(response.Body) } else { //path is local rawBytes, err = ioutil.ReadFile(path)