mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
feat(cli): add aliases user->users vault->vaults
This commit is contained in:
parent
374b0e9df2
commit
648e31b85d
@ -1,8 +1,9 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
type userArgs struct {
|
type userArgs struct {
|
||||||
@ -10,7 +11,7 @@ type userArgs struct {
|
|||||||
name string
|
name string
|
||||||
email string
|
email string
|
||||||
password string
|
password string
|
||||||
admin bool
|
admin bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var targetUserArgs userArgs
|
var targetUserArgs userArgs
|
||||||
@ -20,8 +21,9 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var userCmd = &cobra.Command{
|
var userCmd = &cobra.Command{
|
||||||
Use: "user",
|
Use: "users",
|
||||||
Short: "Manage users",
|
Aliases: []string{"user"},
|
||||||
|
Short: "Manage users",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
_ = cmd.Help()
|
_ = cmd.Help()
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
|
|
||||||
type vaultArgs struct {
|
type vaultArgs struct {
|
||||||
@ -16,8 +17,9 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var vaultCmd = &cobra.Command{
|
var vaultCmd = &cobra.Command{
|
||||||
Use: "vault",
|
Use: "vaults",
|
||||||
Short: "Manage access keys and other secrets",
|
Aliases: []string{"vault"},
|
||||||
|
Short: "Manage access keys and other secrets",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
_ = cmd.Help()
|
_ = cmd.Help()
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user