Merge pull request #2001 from aaronlehmann/simplify-splithostname
reference: Simplify SplitHostname
This commit is contained in:
commit
04c8db562d
1 changed files with 1 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue