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

Function normalizeServerURL

internal/cli/credentials.go:256–258  ·  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

254// reach different servers). Mirrors normalizeURL in cmd/pad/server_info.go
255// so the two stay consistent.
256func normalizeServerURL(u string) string {
257 return strings.TrimRight(strings.TrimSpace(u), "/")
258}

Callers 4

migrateV1Function · 0.85
GetMethod · 0.85
SetMethod · 0.85
DeleteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected