vendor c/image for ListNames in transports pkg

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-06-16 23:39:06 +02:00
parent 4049bf2801
commit e7b32b1e6a
No known key found for this signature in database
GPG Key ID: B2BEAD150DE936B9
2 changed files with 15 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package transports
import ( import (
"fmt" "fmt"
"sort"
"sync" "sync"
"github.com/containers/image/types" "github.com/containers/image/types"
@ -69,3 +70,15 @@ func Register(t types.ImageTransport) {
func ImageName(ref types.ImageReference) string { func ImageName(ref types.ImageReference) string {
return ref.Transport().Name() + ":" + ref.StringWithinTransport() return ref.Transport().Name() + ":" + ref.StringWithinTransport()
} }
// ListNames returns a list of transport names
func ListNames() []string {
kt.mu.Lock()
defer kt.mu.Unlock()
var names []string
for _, transport := range kt.transports {
names = append(names, transport.Name())
}
sort.Strings(names)
return names
}

View File

@ -1,5 +1,5 @@
github.com/Sirupsen/logrus 7f4b1adc791766938c29457bed0703fb9134421a github.com/Sirupsen/logrus 7f4b1adc791766938c29457bed0703fb9134421a
github.com/containers/storage 29d2c86eadb88a0cbfbbedec8762126a3987d4c3 github.com/containers/storage 989b1c1d85f5dfe2076c67b54289cc13dc836c8c
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76 github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
github.com/docker/distribution df5327f76fb6468b84a87771e361762b8be23fdb github.com/docker/distribution df5327f76fb6468b84a87771e361762b8be23fdb
github.com/docker/docker 75843d36aa5c3eaade50da005f9e0ff2602f3d5e github.com/docker/docker 75843d36aa5c3eaade50da005f9e0ff2602f3d5e
@ -34,3 +34,4 @@ github.com/xeipuuv/gojsonpointer master
github.com/tchap/go-patricia v2.2.6 github.com/tchap/go-patricia v2.2.6
github.com/opencontainers/selinux ba1aefe8057f1d0cfb8e88d0ec1dc85925ef987d github.com/opencontainers/selinux ba1aefe8057f1d0cfb8e88d0ec1dc85925ef987d
github.com/BurntSushi/toml b26d9c308763d68093482582cea63d69be07a0f0 github.com/BurntSushi/toml b26d9c308763d68093482582cea63d69be07a0f0
github.com/ostreedev/ostree-go 61532f383f1f48e5c27080b0b9c8b022c3706a97