checkpoint: add remove subcommand

This commit is contained in:
Dan Anglin 2024-05-18 19:00:27 +01:00
parent 4db116121c
commit 5e52119158
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638

View file

@ -53,6 +53,7 @@ func run() error {
updateResource string = "update"
whoami string = "whoami"
add string = "add"
remove string = "remove"
)
summaries := map[string]string{
@ -65,6 +66,7 @@ func run() error {
updateResource: "update a specific resource",
whoami: "print the account that you are currently logged in to",
add: "add a resource to another resource",
remove: "remove a resource from another resource",
}
flag.Usage = enbasUsageFunc(summaries)
@ -101,6 +103,8 @@ func run() error {
executor = newWhoAmICommand(whoami, summaries[whoami])
case add:
executor = newAddCommand(add, summaries[add])
case remove:
executor = newRemoveCommand(remove, summaries[remove])
default:
flag.Usage()
return fmt.Errorf("unknown subcommand %q", subcommand)