diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-02-12 22:24:33 +0000 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2017-02-12 22:24:33 +0000 |
commit | ba4840c52becf73c2749c9ef0f2f09ed0b9d5c7f (patch) | |
tree | 61b839884d66c9dd8269e26117aa4e4c995ad119 /vendor/github.com/magiconair/properties/load.go | |
parent | 6e00d0000e54f21a4a393e67fd914bda4d394f4a (diff) |
Update dependencies
Diffstat (limited to 'vendor/github.com/magiconair/properties/load.go')
-rw-r--r-- | vendor/github.com/magiconair/properties/load.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go index 4300fec..701a86d 100644 --- a/vendor/github.com/magiconair/properties/load.go +++ b/vendor/github.com/magiconair/properties/load.go @@ -1,4 +1,4 @@ -// Copyright 2016 Frank Schroeder. All rights reserved. +// Copyright 2017 Frank Schroeder. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -98,7 +98,7 @@ func MustLoadURL(url string) *Properties { return must(LoadURL(url)) } -// MustLoadFiles reads the content of multiple URLs in the given order into a +// MustLoadURLs reads the content of multiple URLs in the given order into a // Properties struct and panics on error. If 'ignoreMissing' is true then a 404 // status code will not be reported as error. func MustLoadURLs(urls []string, ignoreMissing bool) *Properties { @@ -172,10 +172,12 @@ func loadURL(url string, ignoreMissing bool) (*Properties, error) { return nil, fmt.Errorf("properties: %s returned %d", url, resp.StatusCode) } body, err := ioutil.ReadAll(resp.Body) - resp.Body.Close() if err != nil { return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) } + if err = resp.Body.Close(); err != nil { + return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) + } ct := resp.Header.Get("Content-Type") var enc Encoding |