proxy endpoints part changes

This commit is contained in:
m1093782566
2017-12-10 15:11:35 +08:00
parent 9e85b526cb
commit 6edcf02d9e
3 changed files with 1491 additions and 0 deletions

View File

@@ -47,6 +47,7 @@ func IPPart(s string) string {
return ""
}
// PortPart returns just the port part of an endpoint string.
func PortPart(s string) (int, error) {
// Must be IP:port
_, port, err := net.SplitHostPort(s)