MCPcopy
hub / github.com/cli/cli / displayScopes

Function displayScopes

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

Source from the content-addressed store, hash-verified

338}
339
340func displayScopes(scopes string) string {
341 if scopes == "" {
342 return "none"
343 }
344 list := strings.Split(scopes, ",")
345 for i, s := range list {
346 list[i] = fmt.Sprintf("'%s'", strings.TrimSpace(s))
347 }
348 return strings.Join(list, ", ")
349}
350
351func expectScopes(token string) bool {
352 return strings.HasPrefix(token, "ghp_") || strings.HasPrefix(token, "gho_")

Callers 1

StringMethod · 0.85

Calls 1

JoinMethod · 0.80

Tested by

no test coverage detected