Skip to content

Commit

Permalink
small edit
Browse files Browse the repository at this point in the history
  • Loading branch information
willfairwinds committed Jul 30, 2019
1 parent c132f7e commit 2049698
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2049698

Please sign in to comment.