Vendors new containers/image version using pkg/errors

Signed-off-by: George Lestaris <glestaris@pivotal.io>
This commit is contained in:
George Lestaris
2016-12-19 16:22:04 +00:00
parent fd93ebb78d
commit 78a24cea81
45 changed files with 849 additions and 248 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/containers/image/image"
"github.com/containers/image/types"
"github.com/pkg/errors"
)
// Image is a Docker-specific implementation of types.Image with a few extra methods
@@ -46,7 +47,7 @@ func (i *Image) GetRepositoryTags() ([]string, error) {
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
// print url also
return nil, fmt.Errorf("Invalid status code returned when fetching tags list %d", res.StatusCode)
return nil, errors.Errorf("Invalid status code returned when fetching tags list %d", res.StatusCode)
}
type tagsRes struct {
Tags []string