(name string)
| 22 | ) |
| 23 | |
| 24 | func loginTokenType(name string) (string, error) { |
| 25 | switch name { |
| 26 | case "", tokenPersonal: |
| 27 | return tokenPersonal, nil |
| 28 | case tokenTeamAccess, "team-access", "team_access": |
| 29 | return tokenTeamAccess, nil |
| 30 | case tokenTeamManage, "team-manage", "team_manage": |
| 31 | return tokenTeamManage, nil |
| 32 | default: |
| 33 | return "", fmt.Errorf("unknown login token type %q; expected personal, team-access, or team-manage", name) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | func loginAppKeyFromFlag(cmd *cobra.Command, tokType string) error { |
| 38 | appKey, _ := cmd.Flags().GetString("app-key") |
no outgoing calls