Skip to content

Commit

Permalink
using github.com/pkg/errors & correct some typo mistakes
Browse files Browse the repository at this point in the history
Signed-off-by: kevinetc123 <kaiwentan@harmonycloud.cn>
  • Loading branch information
kevinetc123 committed Feb 24, 2017
1 parent 660783c commit fa58495
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion archive/tar_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion cmd/ctr/pprof.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"os"
"time"

"github.com/pkg/errors"

"github.com/urfave/cli"
)

Expand Down Expand Up @@ -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
}

0 comments on commit fa58495

Please sign in to comment.