Merge pull request #2001 from aaronlehmann/simplify-splithostname
reference: Simplify SplitHostnamemaster
						commit
						04c8db562d
					
				| 
						 | 
					@ -138,7 +138,7 @@ type Canonical interface {
 | 
				
			||||||
func SplitHostname(named Named) (string, string) {
 | 
					func SplitHostname(named Named) (string, string) {
 | 
				
			||||||
	name := named.Name()
 | 
						name := named.Name()
 | 
				
			||||||
	match := anchoredNameRegexp.FindStringSubmatch(name)
 | 
						match := anchoredNameRegexp.FindStringSubmatch(name)
 | 
				
			||||||
	if match == nil || len(match) != 3 {
 | 
						if len(match) != 3 {
 | 
				
			||||||
		return "", name
 | 
							return "", name
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return match[1], match[2]
 | 
						return match[1], match[2]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue