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