24 lines
569 B
Go
24 lines
569 B
Go
package serra
|
|
|
|
import (
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
undeckCmd.Flags().Int64VarP(&count, "count", "c", 1, "Amount of cards to add")
|
|
undeckCmd.Flags().BoolVarP(&foil, "foil", "f", false, "Add foil variant of card")
|
|
rootCmd.AddCommand(undeckCmd)
|
|
}
|
|
|
|
var undeckCmd = &cobra.Command{
|
|
Aliases: []string{"u"},
|
|
Use: "undeck",
|
|
Short: "Unmark a card as in a deck",
|
|
Long: "Unmark a card as in a deck",
|
|
SilenceErrors: true,
|
|
RunE: func(cmd *cobra.Command, cards []string) error {
|
|
deckCards(cards, -count)
|
|
return nil
|
|
},
|
|
}
|