(str string)
| 15 | ) |
| 16 | |
| 17 | func ParseNetwork(str string) (network, addr string, err error) { |
| 18 | if idx := strings.Index(str, networkSplit); idx == -1 { |
| 19 | err = fmt.Errorf("addr: \"%s\" error, must be network@tcp:port or network@unixsocket", str) |
| 20 | return |
| 21 | } else { |
| 22 | network = str[:idx] |
| 23 | addr = str[idx+1:] |
| 24 | return |
| 25 | } |
| 26 | } |
no outgoing calls
no test coverage detected