add parseEndpoint

xiandong 2 years ago committed by kevin
parent fd5b38b07c
commit c593b5b531

@ -20,7 +20,7 @@ func (c *Config) parseEndpoint() (host string, port string) {
if len(EndpointSlice) > 0 { if len(EndpointSlice) > 0 {
host = strings.TrimSpace(EndpointSlice[0]) host = strings.TrimSpace(EndpointSlice[0])
} }
if len(EndpointSlice) > 0 { if len(EndpointSlice) > 1 {
port = strings.TrimSpace(EndpointSlice[1]) port = strings.TrimSpace(EndpointSlice[1])
} }

Loading…
Cancel
Save