(scopes string)
| 338 | } |
| 339 | |
| 340 | func 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 | |
| 351 | func expectScopes(token string) bool { |
| 352 | return strings.HasPrefix(token, "ghp_") || strings.HasPrefix(token, "gho_") |