chore: add more tests (#3010)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package kube
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
@@ -34,10 +33,6 @@ func ParseTarget(target resolver.Target) (Service, error) {
|
||||
endpoints := targets.GetEndpoints(target)
|
||||
if strings.Contains(endpoints, colon) {
|
||||
segs := strings.SplitN(endpoints, colon, 2)
|
||||
if len(segs) < 2 {
|
||||
return emptyService, fmt.Errorf("bad endpoint: %s", endpoints)
|
||||
}
|
||||
|
||||
service.Name = segs[0]
|
||||
port, err := strconv.Atoi(segs[1])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user