From ba4840c52becf73c2749c9ef0f2f09ed0b9d5c7f Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sun, 12 Feb 2017 22:24:33 +0000 Subject: Update dependencies --- vendor/github.com/magiconair/properties/load.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'vendor/github.com/magiconair/properties/load.go') 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 -- cgit v1.2.3