ImageReferenceHasDomain checks if the provided image has a domain definition in it.
(image string)
| 616 | |
| 617 | // ImageReferenceHasDomain checks if the provided image has a domain definition in it. |
| 618 | func 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 | |
| 634 | func IsP11KitClientPresent() (bool, error) { |
| 635 | var p11KitClientPaths []string |
no outgoing calls
no test coverage detected
searching dependent graphs…