diff options
Diffstat (limited to 'vendor/github.com/magiconair/properties/load.go')
-rw-r--r-- | vendor/github.com/magiconair/properties/load.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/github.com/magiconair/properties/load.go b/vendor/github.com/magiconair/properties/load.go index c8e1b580..ab953253 100644 --- a/vendor/github.com/magiconair/properties/load.go +++ b/vendor/github.com/magiconair/properties/load.go @@ -115,6 +115,7 @@ func (l *Loader) LoadURL(url string) (*Properties, error) { if err != nil { return nil, fmt.Errorf("properties: error fetching %q. %s", url, err) } + defer resp.Body.Close() if resp.StatusCode == 404 && l.IgnoreMissing { LogPrintf("properties: %s returned %d. skipping", url, resp.StatusCode) @@ -129,7 +130,6 @@ func (l *Loader) LoadURL(url string) (*Properties, error) { if err != nil { return nil, fmt.Errorf("properties: %s error reading response. %s", url, err) } - defer resp.Body.Close() ct := resp.Header.Get("Content-Type") var enc Encoding |