MCPcopy
hub / github.com/link1st/gowebsocket / StringToServer

Function StringToServer

models/server_model.go:36–49  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

34}
35
36func StringToServer(str string) (server *Server, err error) {
37 list := strings.Split(str, ":")
38 if len(list) != 2 {
39
40 return nil, errors.New("err")
41 }
42
43 server = &Server{
44 Ip: list[0],
45 Port: list[1],
46 }
47
48 return
49}

Callers 1

GetServerAllFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected