Move FindSnapshot, make Repository.List() return IDs

This commit is contained in:
Alexander Neumann 2015-05-17 20:48:59 +02:00
parent cf37b619fd
commit 6e38a8a033
12 changed files with 75 additions and 97 deletions

View file

@ -56,18 +56,6 @@ func Find(be Lister, t Type, prefix string) (string, error) {
return "", ErrNoIDPrefixFound
}
// FindSnapshot takes a string and tries to find a snapshot whose ID matches
// the string as closely as possible.
func FindSnapshot(be Lister, s string) (string, error) {
// find snapshot id with prefix
name, err := Find(be, Snapshot, s)
if err != nil {
return "", err
}
return name, nil
}
// PrefixLength returns the number of bytes required so that all prefixes of
// all names of type t are unique.
func PrefixLength(be Lister, t Type) (int, error) {