24 lines
393 B
Go
24 lines
393 B
Go
package hmsecrets
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(delCmd)
|
|
}
|
|
|
|
var delCmd = &cobra.Command{
|
|
Use: "del",
|
|
Short: "del [key]",
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
cli := getClient(apiBase, caFile, clientCert, clientKey)
|
|
err := cli.Delete(args[0])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
},
|
|
}
|