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

Function displayScopes

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

Source from the content-addressed store, hash-verified

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

Callers 1

StringMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected