mirror of
https://github.com/onyx-and-iris/lottery-cli.git
synced 2026-08-17 00:34:25 +00:00
add --count and --count-prompt flags
add support for env vars. add count prompt logic to the root command update the README.
This commit is contained in:
27
README.md
27
README.md
@@ -16,6 +16,33 @@ Play National Lottery games from your terminal.
|
||||
go install github.com/onyx-and-iris/lottery-cli/cmd/lottery@latest
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
*flags*
|
||||
|
||||
- --count/-c: Number of draws to generate.
|
||||
- --count-prompt/-C: Prompt for the number of draws to generate.
|
||||
> Note. If both --count and --count-prompt are passed the count prompt will win.
|
||||
|
||||
*environment variables*
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export LOTTERY_COUNT=3
|
||||
export LOTTERY_COUNT_PROMPT=false
|
||||
```
|
||||
|
||||
## Use
|
||||
|
||||
There are no subcommands, just run the CLI directly passing any desired flags:
|
||||
|
||||
```bash
|
||||
lottery --count=3
|
||||
```
|
||||
|
||||
You will then be entered into the selection prompt.
|
||||
|
||||
## Special Thanks
|
||||
|
||||
- [spf13](https://github.com/spf13) for the [cobra](https://github.com/spf13/cobra) package.
|
||||
|
||||
Reference in New Issue
Block a user