mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
add parseEndpoint
This commit is contained in:
parent
4e6d800877
commit
16a5f30b0c
@ -20,7 +20,7 @@ func (c *Config) parseEndpoint() (host string, port string) {
|
||||
if len(EndpointSlice) > 0 {
|
||||
host = strings.TrimSpace(EndpointSlice[0])
|
||||
}
|
||||
if len(EndpointSlice) > 0 {
|
||||
if len(EndpointSlice) > 1 {
|
||||
port = strings.TrimSpace(EndpointSlice[1])
|
||||
}
|
||||
return host, port
|
||||
|
Loading…
Reference in New Issue
Block a user