mirror of
https://github.com/onyx-and-iris/lottery-cli.git
synced 2026-08-17 08:44:25 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 12ca7d8fc2 |
@@ -69,5 +69,5 @@ lottery -k=euromillions -c=3
|
||||
|
||||
## Special Thanks
|
||||
|
||||
- [spf13](https://github.com/spf13) for the [cobra](https://github.com/spf13/cobra) package.
|
||||
- [spf13](https://github.com/spf13) for the [cobra](https://github.com/spf13/cobra) and [viper](https://github.com/spf13/viper) packages.
|
||||
- [Charm](https://github.com/charmbracelet) developers for the [fang](https://github.com/charmbracelet/fang), [lipgloss](https://github.com/charmbracelet/lipgloss) and [huh](https://github.com/charmbracelet/huh) packages.
|
||||
@@ -141,6 +141,11 @@ func renderDrawCollection(title string, entries []string) string {
|
||||
|
||||
separator := separatorStyle.Render(strings.Repeat("─", maxLineWidth(entries)))
|
||||
body := strings.Join(entries, "\n"+separator+"\n")
|
||||
|
||||
return cardStyle.Render(titleStyle.Render(title+" draws") + "\n" + body)
|
||||
if len(entries) == 1 {
|
||||
title = titleStyle.Render(title + " draw")
|
||||
} else {
|
||||
title = titleStyle.Render(title + " draws")
|
||||
}
|
||||
|
||||
return cardStyle.Render(title + "\n" + body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user