2016-05-06 17:59:36 +00:00
|
|
|
package main
|
|
|
|
|
2017-03-16 10:14:02 +00:00
|
|
|
import "github.com/urfave/cli"
|
2016-05-06 17:59:36 +00:00
|
|
|
|
|
|
|
var secretRemoveCmd = cli.Command{
|
2017-03-16 10:14:02 +00:00
|
|
|
Name: "rm",
|
|
|
|
Usage: "remove a secret",
|
|
|
|
Action: secretRemove,
|
2016-05-06 17:59:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
}
|