(token string)
| 421 | var knownTokenPrefixes = []string{"github_pat_", "ghp_", "gho_", "ghu_", "ghs_", "ghr_"} |
| 422 | |
| 423 | func maskToken(token string) string { |
| 424 | for _, prefix := range knownTokenPrefixes { |
| 425 | if strings.HasPrefix(token, prefix) { |
| 426 | return prefix + strings.Repeat("*", len(token)-len(prefix)) |
| 427 | } |
| 428 | } |
| 429 | return strings.Repeat("*", len(token)) |
| 430 | } |
| 431 | |
| 432 | func displayScopes(scopes string) string { |
| 433 | if scopes == "" { |
no outgoing calls