harness-drone/drone/secret_rm.go

26 lines
427 B
Go
Raw Normal View History

package main
2017-03-16 10:14:02 +00:00
import "github.com/urfave/cli"
var secretRemoveCmd = cli.Command{
2017-03-16 10:14:02 +00:00
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)
}