woodpecker/drone/secret_rm.go
2017-03-16 18:14:02 +08:00

25 lines
427 B
Go

package main
import "github.com/urfave/cli"
var secretRemoveCmd = cli.Command{
Name: "rm",
Usage: "remove a secret",
Action: secretRemove,
}
func secretRemove(c *cli.Context) error {
repo := c.Args().First()
owner, name, err := parseRepo(repo)
if err != nil {
return err
}
secret := c.Args().Get(1)
client, err := newClient(c)
if err != nil {
return err
}
return client.SecretDel(owner, name, secret)
}