MCPcopy
hub / github.com/containers/toolbox / ImageReferenceHasDomain

Function ImageReferenceHasDomain

src/pkg/utils/utils.go:618–632  ·  view source on GitHub ↗

ImageReferenceHasDomain checks if the provided image has a domain definition in it.

(image string)

Source from the content-addressed store, hash-verified

616
617// ImageReferenceHasDomain checks if the provided image has a domain definition in it.
618func ImageReferenceHasDomain(image string) bool {
619 i := strings.IndexRune(image, '/')
620 if i == -1 {
621 return false
622 }
623
624 prefix := image[:i]
625
626 // A domain should contain a top level domain name. An exception is 'localhost'
627 if !strings.ContainsAny(prefix, ".:") && prefix != "localhost" {
628 return false
629 }
630
631 return true
632}
633
634func IsP11KitClientPresent() (bool, error) {
635 var p11KitClientPaths []string

Callers 4

ImageReferenceGetDomainFunction · 0.85
ImageReferenceGetTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…