mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 15:14:22 +08:00
23 lines
432 B
Go
23 lines
432 B
Go
package keys
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/gravitl/netmaker/cli/functions"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var keysDeleteCmd = &cobra.Command{
|
|
Use: "delete [NETWORK NAME] [KEY NAME]",
|
|
Args: cobra.ExactArgs(2),
|
|
Short: "Delete a key",
|
|
Long: `Delete a key`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
functions.DeleteKey(args[0], args[1])
|
|
fmt.Println("Success")
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(keysDeleteCmd)
|
|
}
|