feat(cli): add aliases user->users vault->vaults

This commit is contained in:
Denis Gukov 2024-10-13 14:38:09 +00:00
parent 374b0e9df2
commit 648e31b85d
2 changed files with 11 additions and 7 deletions

View File

@ -1,8 +1,9 @@
package cmd
import (
"github.com/spf13/cobra"
"os"
"github.com/spf13/cobra"
)
type userArgs struct {
@ -10,7 +11,7 @@ type userArgs struct {
name string
email string
password string
admin bool
admin bool
}
var targetUserArgs userArgs
@ -20,8 +21,9 @@ func init() {
}
var userCmd = &cobra.Command{
Use: "user",
Short: "Manage users",
Use: "users",
Aliases: []string{"user"},
Short: "Manage users",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
os.Exit(0)

View File

@ -1,8 +1,9 @@
package cmd
import (
"github.com/spf13/cobra"
"os"
"github.com/spf13/cobra"
)
type vaultArgs struct {
@ -16,8 +17,9 @@ func init() {
}
var vaultCmd = &cobra.Command{
Use: "vault",
Short: "Manage access keys and other secrets",
Use: "vaults",
Aliases: []string{"vault"},
Short: "Manage access keys and other secrets",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
os.Exit(0)