Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
This commit is contained in:
Oliver Davies 2025-10-05 01:03:16 +01:00
parent 7b6712e05a
commit 1f59dd60e5

View file

@ -13,20 +13,20 @@ import (
) )
type ZetList struct { type ZetList struct {
Ids []int Ids []int
UseColors bool UseColours bool
} }
func NewZetList(ids []int, useColors ...bool) *ZetList { func NewZetList(ids []int, useColours ...bool) *ZetList {
colorSetting := true colourSetting := true
if len(useColors) > 0 { if len(useColours) > 0 {
colorSetting = useColors[0] colourSetting = useColours[0]
} }
return &ZetList{ return &ZetList{
Ids: ids, Ids: ids,
UseColors: colorSetting, UseColours: colourSetting,
} }
} }
@ -39,7 +39,7 @@ func (z *ZetList) Parse() []string {
for _, num := range z.Ids { for _, num := range z.Ids {
line := fmt.Sprintf("%s %s", strconv.Itoa(num), getTitle(num)) line := fmt.Sprintf("%s %s", strconv.Itoa(num), getTitle(num))
if z.UseColors { if z.UseColours {
line = fmt.Sprintf("%s%s%s %s", green, strconv.Itoa(num), reset, getTitle(num)) line = fmt.Sprintf("%s%s%s %s", green, strconv.Itoa(num), reset, getTitle(num))
} }