a41f938cec
As we have seen, dependencies version can prevent the build. We should user lock versions on dependencies that we know work: * Packages are vendored * Add Godep support * Added addtional install step in readme * Fix travis build error
19 lignes
309 o
Go
19 lignes
309 o
Go
package missinggo
|
|
|
|
import (
|
|
"net"
|
|
"strconv"
|
|
)
|
|
|
|
func ParseHostPort(hostport string) (host string, port int, err error) {
|
|
host, portStr, err := net.SplitHostPort(hostport)
|
|
if err != nil {
|
|
return
|
|
}
|
|
port64, err := strconv.ParseInt(portStr, 0, 0)
|
|
if err != nil {
|
|
return
|
|
}
|
|
port = int(port64)
|
|
return
|
|
}
|