Updating docker/distribution vendoring
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
This commit is contained in:
parent
65835bfaa6
commit
d910781c66
3 changed files with 35 additions and 1 deletions
|
@ -44,7 +44,7 @@ github.com/boltdb/bolt fff57c100f4dea1905678da7e90d92429dff2904
|
|||
github.com/miekg/dns 75e6e86cc601825c5dbcd4e0c209eab180997cd7
|
||||
|
||||
# get graph and distribution packages
|
||||
github.com/docker/distribution 8016d2d8903e378edacac11e4d809efbc987ad61
|
||||
github.com/docker/distribution d22e09a6686c32be8c17b684b639da4b90efe320
|
||||
github.com/vbatts/tar-split v0.10.1
|
||||
|
||||
# get go-zfs packages
|
||||
|
|
12
vendor/github.com/docker/distribution/reference/helpers.go
generated
vendored
Normal file
12
vendor/github.com/docker/distribution/reference/helpers.go
generated
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
package reference
|
||||
|
||||
// IsNameOnly returns true if reference only contains a repo name.
|
||||
func IsNameOnly(ref Named) bool {
|
||||
if _, ok := ref.(NamedTagged); ok {
|
||||
return false
|
||||
}
|
||||
if _, ok := ref.(Canonical); ok {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
22
vendor/github.com/docker/distribution/reference/normalize.go
generated
vendored
Normal file
22
vendor/github.com/docker/distribution/reference/normalize.go
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
package reference
|
||||
|
||||
var (
|
||||
defaultTag = "latest"
|
||||
)
|
||||
|
||||
// EnsureTagged adds the default tag "latest" to a reference if it only has
|
||||
// a repo name.
|
||||
func EnsureTagged(ref Named) NamedTagged {
|
||||
namedTagged, ok := ref.(NamedTagged)
|
||||
if !ok {
|
||||
namedTagged, err := WithTag(ref, defaultTag)
|
||||
if err != nil {
|
||||
// Default tag must be valid, to create a NamedTagged
|
||||
// type with non-validated input the WithTag function
|
||||
// should be used instead
|
||||
panic(err)
|
||||
}
|
||||
return namedTagged
|
||||
}
|
||||
return namedTagged
|
||||
}
|
Loading…
Reference in a new issue