(hostPort string)
| 92 | } |
| 93 | |
| 94 | func getHost(hostPort string) string { |
| 95 | if hostPort == "" { |
| 96 | return "" |
| 97 | } |
| 98 | |
| 99 | host, _, err := net.SplitHostPort(hostPort) |
| 100 | if err != nil { |
| 101 | return hostPort |
| 102 | } |
| 103 | return host |
| 104 | } |
| 105 | |
| 106 | // RemoteIPHandler is similar to RemoteAddrHandler, but logs only |
| 107 | // an IP, not a port. |
no outgoing calls