fix compiler unit tests, hook up daemon

This commit is contained in:
Brad Rydzewski
2019-10-22 23:13:40 -07:00
parent 22e660dda7
commit 09f19e5b99
28 changed files with 1694 additions and 791 deletions

View File

@@ -4,7 +4,11 @@
package image
import "github.com/docker/distribution/reference"
import (
"strings"
"github.com/docker/distribution/reference"
)
// Trim returns the short image name without tag.
func Trim(name string) string {
@@ -69,3 +73,9 @@ func MatchHostname(image, hostname string) bool {
}
return reference.Domain(named) == hostname
}
// IsLatest parses the image and returns true if
// the image uses the :latest tag.
func IsLatest(s string) bool {
return strings.HasSuffix(Expand(s), ":latest")
}