strip port from addresses with hostname, ipv4 or ipv6
(address string)
| 60 | |
| 61 | // strip port from addresses with hostname, ipv4 or ipv6 |
| 62 | func stripPort(address string) string { |
| 63 | if h, _, err := net.SplitHostPort(address); err == nil { |
| 64 | return h |
| 65 | } |
| 66 | |
| 67 | return address |
| 68 | } |
| 69 | |
| 70 | // The remote host of the client. When the 'X-Forwarded-For' |
| 71 | // header is set, then its value is used as is. |
no outgoing calls
no test coverage detected
searching dependent graphs…