MCPcopy Create free account
hub / github.com/cli/cli / displayScopes

Function displayScopes

pkg/cmd/auth/status/status.go:432–441  ·  view source on GitHub ↗
(scopes string)

Source from the content-addressed store, hash-verified

430}
431
432func displayScopes(scopes string) string {
433 if scopes == "" {
434 return "none"
435 }
436 list := strings.Split(scopes, ",")
437 for i, s := range list {
438 list[i] = fmt.Sprintf("'%s'", strings.TrimSpace(s))
439 }
440 return strings.Join(list, ", ")
441}
442
443// TODO: this matches a token prefix itself. It could ask
444// gh.AuthConfig.ActiveTokenType instead.

Callers 1

StringMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected