MCPcopy Create free account
hub / github.com/LockGit/gochat / ParseNetwork

Function ParseNetwork

tools/network.go:17–26  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

15)
16
17func 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}

Callers 3

InitRpcServerMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected