Files
lottery-cli/cmd/lottery/list.go
onyx-and-iris dd49700eb1 add list subcommand
add renderKindList()
2026-08-01 04:19:18 +01:00

25 lines
432 B
Go

package main
import (
"fmt"
"github.com/spf13/cobra"
"github.com/onyx-and-iris/lottery-cli"
)
// listCmd represents the list command.
var listCmd = &cobra.Command{
Use: "list",
Aliases: []string{"ls"},
Short: "List all available lottery kinds.",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println(renderKindList(lottery.AllKinds()))
return nil
},
}
func init() {
rootCmd.AddCommand(listCmd)
}