Convert to using github.com/pkg/errors everywhere

This commit is contained in:
Nick Craig-Wood
2016-06-13 17:43:03 +01:00
parent 7fe653c350
commit 4c5b2833b3
32 changed files with 187 additions and 161 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
package src
import (
"fmt"
"io"
"io/ioutil"
"net/http"
"github.com/pkg/errors"
)
// PerformDownload does the actual download via unscoped PUT request.
@@ -27,7 +28,7 @@ func (c *Client) PerformDownload(url string) (out io.ReadCloser, err error) {
if err != nil {
return nil, err
}
return nil, fmt.Errorf("download error [%d]: %s", resp.StatusCode, string(body[:]))
return nil, errors.Errorf("download error [%d]: %s", resp.StatusCode, string(body[:]))
}
return resp.Body, err
}