From ab6ae11bc16ded76986caf87338a83ecf6003f26 Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Thu, 13 Oct 2016 14:51:37 -0700 Subject: [PATCH] reference: Simplify SplitHostname This nil check is not necessary. Signed-off-by: Aaron Lehmann --- reference/reference.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/reference.go b/reference/reference.go index 5b3e08ee..dc3af167 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]