(token string)
| 338 | var knownTokenPrefixes = []string{"github_pat_", "ghp_", "gho_", "ghu_", "ghs_", "ghr_"} |
| 339 | |
| 340 | func maskToken(token string) string { |
| 341 | for _, prefix := range knownTokenPrefixes { |
| 342 | if strings.HasPrefix(token, prefix) { |
| 343 | return prefix + strings.Repeat("*", len(token)-len(prefix)) |
| 344 | } |
| 345 | } |
| 346 | return strings.Repeat("*", len(token)) |
| 347 | } |
| 348 | |
| 349 | func displayScopes(scopes string) string { |
| 350 | if scopes == "" { |
no outgoing calls