diff --git a/reference/reference.go b/reference/reference.go index 5b3e08ee4..dc3af1670 100644 --- a/reference/reference.go +++ b/reference/reference.go @@ -138,7 +138,7 @@ type Canonical interface { func SplitHostname(named Named) (string, string) { name := named.Name() match := anchoredNameRegexp.FindStringSubmatch(name) - if match == nil || len(match) != 3 { + if len(match) != 3 { return "", name } return match[1], match[2]