MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / credsToKey

Function credsToKey

lfsapi/auth_test.go:345–356  ·  view source on GitHub ↗
(creds creds.Creds)

Source from the content-addressed store, hash-verified

343}
344
345func credsToKey(creds creds.Creds) string {
346 var kvs []string
347 for _, k := range []string{"protocol", "host", "path"} {
348 value := ""
349 if v, ok := creds[k]; ok && len(v) == 1 {
350 value = v[0]
351 }
352 kvs = append(kvs, fmt.Sprintf("%s:%s", k, value))
353 }
354
355 return strings.Join(kvs, " ")
356}
357
358func basicAuth(user, pass string) string {
359 value := fmt.Sprintf("%s:%s", user, pass)

Callers 4

FillMethod · 0.85
ApproveMethod · 0.85
RejectMethod · 0.85
IsApprovedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected