Scheduler: remove direct import to /pkg/util/parsers

This commit is contained in:
drfish
2020-04-09 23:32:57 +08:00
parent 4bdb72ed11
commit 0b715ea690
6 changed files with 8 additions and 19 deletions

View File

@@ -26,11 +26,6 @@ import (
dockerref "github.com/docker/distribution/reference"
)
const (
// DefaultImageTag is the default tag for docker image.
DefaultImageTag = "latest"
)
// ParseImageName parses a docker image string into three parts: repo, tag and digest.
// If both tag and digest are empty, a default image tag will be returned.
func ParseImageName(image string) (string, string, string, error) {
@@ -53,7 +48,7 @@ func ParseImageName(image string) (string, string, string, error) {
}
// If no tag was specified, use the default "latest".
if len(tag) == 0 && len(digest) == 0 {
tag = DefaultImageTag
tag = "latest"
}
return repoToPull, tag, digest, nil
}