mirror of
https://github.com/onyx-and-iris/lottery-cli.git
synced 2026-08-17 00:34:25 +00:00
add --kind flag, it allows you to configure the lottery kind directly, skipping the selection prompt
update the README with more examples.
This commit is contained in:
5
kinds.go
5
kinds.go
@@ -25,6 +25,9 @@ func ParseKind(kind string) (Kind, error) {
|
||||
case "powerball":
|
||||
return KindPowerball, nil
|
||||
default:
|
||||
return "", fmt.Errorf("invalid lottery kind: %s", kind)
|
||||
return "", fmt.Errorf(
|
||||
"invalid lottery kind: %s, must be one of: lotto, euromillions, setforlife, thunderball, powerball",
|
||||
kind,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user