mirror of
https://github.com/onyx-and-iris/lottery-cli.git
synced 2026-08-17 00:34:25 +00:00
pluralise draw only if entries>1
This commit is contained in:
@@ -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")
|
||||
if len(entries) == 1 {
|
||||
title = titleStyle.Render(title + " draw")
|
||||
} else {
|
||||
title = titleStyle.Render(title + " draws")
|
||||
}
|
||||
|
||||
return cardStyle.Render(titleStyle.Render(title+" draws") + "\n" + body)
|
||||
return cardStyle.Render(title + "\n" + body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user