MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / normalizeServerURL

Function normalizeServerURL

internal/cli/credentials.go:606–608  ·  view source on GitHub ↗

normalizeServerURL canonicalizes a server URL for use as a credential key. Trailing slash and surrounding whitespace are stripped; nothing else is touched (no scheme normalization, no port-canonicalization — those are deliberate, since differently-spelled URLs may legitimately reach different server

(u string)

Source from the content-addressed store, hash-verified

604// reach different servers). Mirrors normalizeURL in cmd/pad/server_info.go
605// so the two stay consistent.
606func normalizeServerURL(u string) string {
607 return strings.TrimRight(strings.TrimSpace(u), "/")
608}

Callers 5

migrateV1Function · 0.70
GetMethod · 0.70
SetMethod · 0.70
DeleteMethod · 0.70
sameServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected