зеркало из https://github.com/microsoft/docker.git
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:
Родитель
8da1810975
Коммит
846a9e8963
2
tags.go
2
tags.go
|
@ -6,6 +6,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -94,6 +95,7 @@ func (store *TagStore) ById() map[string][]string {
|
||||||
byId[id] = []string{name}
|
byId[id] = []string{name}
|
||||||
} else {
|
} else {
|
||||||
byId[id] = append(byId[id], name)
|
byId[id] = append(byId[id], name)
|
||||||
|
sort.Strings(byId[id])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче