Skip to content

Commit

Permalink
Remove unused import
Browse files Browse the repository at this point in the history
  • Loading branch information
tintoy committed Jan 8, 2018
1 parent f388688 commit 765daf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions compute/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (client *Client) executeRequest(request *http.Request) (responseBody []byte
}

if err != nil {
err = errors.Wrapf(err,"Unexpected error while performing '%s' request to '%s': %s",
err = errors.Wrapf(err, "Unexpected error while performing '%s' request to '%s': %s",
request.Method,
request.URL.String(),
)
Expand All @@ -243,7 +243,7 @@ func (client *Client) executeRequest(request *http.Request) (responseBody []byte

responseBody, err = ioutil.ReadAll(response.Body)
if err != nil {
err = errors.Wrapf(err,"error reading response body for '%s'", request.URL.String())
err = errors.Wrapf(err, "error reading response body for '%s'", request.URL.String())
}

if client.IsExtendedLoggingEnabled() {
Expand Down Expand Up @@ -347,7 +347,7 @@ func readAPIResponseV1(responseBody []byte, statusCode int) (apiResponse *APIRes
apiResponse = &APIResponseV1{}
err = xml.Unmarshal(responseBody, apiResponse)
if err != nil {
err = errors.Wrapf(err,"error reading API response (v1) from XML")
err = errors.Wrapf(err, "error reading API response (v1) from XML")

return
}
Expand All @@ -368,7 +368,7 @@ func readAPIResponseAsJSON(responseBody []byte, statusCode int) (apiResponse *AP
apiResponse = &APIResponseV2{}
err = json.Unmarshal(responseBody, apiResponse)
if err != nil {
err = errors.Wrapf(err,"error reading API response (v2) from JSON")
err = errors.Wrapf(err, "error reading API response (v2) from JSON")

return
}
Expand Down
5 changes: 2 additions & 3 deletions compute/requests/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package requests

import (
"bytes"
"fmt"
"github.com/pkg/errors"
"io"
"io/ioutil"
"net/http"
"github.com/pkg/errors"
)

// CreateSnapshot creates a snapshot of the specified request.
Expand Down Expand Up @@ -99,7 +98,7 @@ func CacheBody(request *http.Request) (requestBody []byte, err error) {

requestBody, err = ioutil.ReadAll(request.Body)
if err != nil {
err = errors.Wrapf(err,"unexpected error reading request body")
err = errors.Wrapf(err, "unexpected error reading request body")

return
}
Expand Down

0 comments on commit 765daf7

Please sign in to comment.