MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / trimAddrPort

Function trimAddrPort

handler/handler.go:291–297  ·  view source on GitHub ↗
(addrPort string)

Source from the content-addressed store, hash-verified

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

Callers 3

PortForwardHandlerFunction · 0.85
SOCKSHandlerFunction · 0.85
ServeHTTPMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected