fix compiler unit tests, hook up daemon
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user