(addrPort string)
| 289 | } |
| 290 | |
| 291 | func trimAddrPort(addrPort string) string { |
| 292 | res, _, err := net.SplitHostPort(addrPort) |
| 293 | if err != nil { |
| 294 | return addrPort |
| 295 | } |
| 296 | return res |
| 297 | } |
| 298 | |
| 299 | func getLocalAddr(ctx context.Context) string { |
| 300 | if addr, ok := ctx.Value(http.LocalAddrContextKey).(net.Addr); ok { |
no outgoing calls
no test coverage detected