feat: WIP server rm command

This commit is contained in:
2021-07-22 17:38:44 +01:00
parent dd86ec4ca8
commit dfc91a86a1
2 changed files with 27 additions and 1 deletions

View File

@ -82,9 +82,16 @@ var serverNewCommand = &cli.Command{
var serverRemoveCommand = &cli.Command{
Name: "remove",
Aliases: []string{"rm"},
Aliases: []string{"rm", "delete"},
Usage: "Remove server <host>",
HideHelp: true,
Action: func(c *cli.Context) error {
server := c.Args().First()
if err := client.DeleteContext(server); err != nil {
logrus.Fatal(err)
}
return nil
},
}
var serverInitCommand = &cli.Command{