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

Method Get

internal/cli/credentials.go:174–179  ·  view source on GitHub ↗

Get returns the credential for the given server URL, or nil if none exists. URL is canonicalized (trailing slash + whitespace stripped) before lookup. Nil-receiver safe — callers can write `store.Get(url)` without a prior nil check on store.

(serverURL string)

Source from the content-addressed store, hash-verified

172// before lookup. Nil-receiver safe — callers can write
173// `store.Get(url)` without a prior nil check on store.
174func (s *CredentialStore) Get(serverURL string) *Credentials {
175 if s == nil || s.Credentials == nil {
176 return nil
177 }
178 return s.Credentials[normalizeServerURL(serverURL)]
179}
180
181// Set adds or replaces the credential for the given server URL. The
182// canonical URL is mirrored into the value's ServerURL field so a

Callers 1

Calls 1

normalizeServerURLFunction · 0.85

Tested by 1