MCPcopy
hub / github.com/cli/cli / maskToken

Function maskToken

pkg/cmd/auth/status/status.go:332–338  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

330}
331
332func maskToken(token string) string {
333 if idx := strings.LastIndexByte(token, '_'); idx > -1 {
334 prefix := token[0 : idx+1]
335 return prefix + strings.Repeat("*", len(token)-len(prefix))
336 }
337 return strings.Repeat("*", len(token))
338}
339
340func displayScopes(scopes string) string {
341 if scopes == "" {

Callers 1

statusRunFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected