From 846a9e8963ba58596b87024d5d108fea8d1c7399 Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 26 Mar 2013 15:30:16 -0700 Subject: [PATCH] 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 --- tags.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tags.go b/tags.go index e259c2e7ea..4f2b92e0bb 100644 --- a/tags.go +++ b/tags.go @@ -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]) } } }