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

Function displayScopes

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

Source from the content-addressed store, hash-verified

347}
348
349func displayScopes(scopes string) string {
350 if scopes == "" {
351 return "none"
352 }
353 list := strings.Split(scopes, ",")
354 for i, s := range list {
355 list[i] = fmt.Sprintf("'%s'", strings.TrimSpace(s))
356 }
357 return strings.Join(list, ", ")
358}
359
360// TODO: this matches a token prefix itself. It could ask
361// gh.AuthConfig.ActiveTokenType instead.

Callers 1

StringMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected