(scopes string)
| 345 | } |
| 346 | |
| 347 | func displayScopes(scopes string) string { |
| 348 | if scopes == "" { |
| 349 | return "none" |
| 350 | } |
| 351 | list := strings.Split(scopes, ",") |
| 352 | for i, s := range list { |
| 353 | list[i] = fmt.Sprintf("'%s'", strings.TrimSpace(s)) |
| 354 | } |
| 355 | return strings.Join(list, ", ") |
| 356 | } |
| 357 | |
| 358 | func expectScopes(token string) bool { |
| 359 | return strings.HasPrefix(token, "ghp_") || strings.HasPrefix(token, "gho_") |