1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

When doing a reverse-lookup of an image's tag, if the image has multiple tags, the first tag in alphabetical order will be used

This commit is contained in:
Solomon Hykes 2013-03-26 15:30:16 -07:00
parent 8da1810975
commit 846a9e8963

View file

@ -6,6 +6,7 @@ import (
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
)
@ -94,6 +95,7 @@ func (store *TagStore) ById() map[string][]string {
byId[id] = []string{name}
} else {
byId[id] = append(byId[id], name)
sort.Strings(byId[id])
}
}
}