Skip to content

Commit

Permalink
Rename token deletion command
Browse files Browse the repository at this point in the history
`configs token delete` is now `configs token revoke`. `delete` is still supported as an alias and there are no plans to deprecate it.
  • Loading branch information
Piccirello committed Jan 24, 2020
1 parent 9ccac26 commit 3b05fa6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions pkg/cmd/enclave_configs_tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ var configsTokensCreateCmd = &cobra.Command{
},
}

var configsTokensDeleteCmd = &cobra.Command{
Use: "delete [slug]",
Short: "Delete a service token from a config",
var configsTokensRevokeCmd = &cobra.Command{
Use: "revoke [slug]",
Aliases: []string{"delete"},
Short: "Revoke a service token from a config",
Args: cobra.MaximumNArgs(1),
Run: func(cmd *cobra.Command, args []string) {
jsonFlag := utils.OutputJSON
Expand Down Expand Up @@ -142,11 +143,11 @@ func init() {
configsTokensCreateCmd.Flags().Bool("copy", false, "copy the token to your clipboard")
configsTokensCmd.AddCommand(configsTokensCreateCmd)

configsTokensDeleteCmd.Flags().String("slug", "", "service token slug")
configsTokensDeleteCmd.Flags().StringP("project", "p", "", "enclave project (e.g. backend)")
configsTokensDeleteCmd.Flags().StringP("config", "c", "", "enclave config (e.g. dev)")
configsTokensDeleteCmd.Flags().Bool("silent", false, "disable text output")
configsTokensCmd.AddCommand(configsTokensDeleteCmd)
configsTokensRevokeCmd.Flags().String("slug", "", "service token slug")
configsTokensRevokeCmd.Flags().StringP("project", "p", "", "enclave project (e.g. backend)")
configsTokensRevokeCmd.Flags().StringP("config", "c", "", "enclave config (e.g. dev)")
configsTokensRevokeCmd.Flags().Bool("silent", false, "disable text output")
configsTokensCmd.AddCommand(configsTokensRevokeCmd)

enclaveCmd.AddCommand(configsCmd)
}

0 comments on commit 3b05fa6

Please sign in to comment.