MCPcopy
hub / github.com/pocketbase/pocketbase / serverAddrToHost

Function serverAddrToHost

apis/serve.go:317–322  ·  view source on GitHub ↗

serverAddrToHost loosely converts http.Server.Addr string into a host to print.

(addr string)

Source from the content-addressed store, hash-verified

315
316// serverAddrToHost loosely converts http.Server.Addr string into a host to print.
317func serverAddrToHost(addr string) string {
318 if addr == "" || strings.HasSuffix(addr, ":http") || strings.HasSuffix(addr, ":https") {
319 return "127.0.0.1"
320 }
321 return addr
322}
323
324type serverErrorLogWriter struct {
325 app core.App

Callers 1

ServeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…