Merge pull request #536 from kevinetc123/patch-2
simplify code & correct some typo mistakes
This commit is contained in:
commit
8de7b6062c
2 changed files with 4 additions and 2 deletions
|
@ -10,7 +10,7 @@ import (
|
|||
"github.com/docker/docker/pkg/system"
|
||||
)
|
||||
|
||||
// canonicalTarNameForPath returns platform-specific filepath
|
||||
// tarName returns platform-specific filepath
|
||||
// to canonical posix-style path for tar archival. p is relative
|
||||
// path.
|
||||
func tarName(p string) (string, error) {
|
||||
|
|
|
@ -8,6 +8,8 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
|
@ -175,7 +177,7 @@ func httpGetRequest(client *http.Client, request string) (io.ReadCloser, error)
|
|||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != 200 {
|
||||
return nil, fmt.Errorf("%s", resp.Status)
|
||||
return nil, errors.Errorf("http get failed with status: %s", resp.Status)
|
||||
}
|
||||
return resp.Body, nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue