diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-08-07 14:44:10 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-08-07 14:44:24 +0200 |
commit | 33e94090b10c67ef036803dd14d47af749a5767a (patch) | |
tree | cdee04d71f988dea4b98f0dcd927f0e735fd4518 /src/templates.go | |
parent | 3f064cd622d7dd1c74a506eee0766e80a869a94c (diff) |
Diffstat (limited to 'src/templates.go')
-rw-r--r-- | src/templates.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/templates.go b/src/templates.go index 076f8dc..6a43fcb 100644 --- a/src/templates.go +++ b/src/templates.go @@ -10,7 +10,6 @@ import ( . "git.thomasvoss.com/euro-cash.eu/pkg/try" "git.thomasvoss.com/euro-cash.eu/pkg/watch" - "git.thomasvoss.com/euro-cash.eu/src/dbx" "git.thomasvoss.com/euro-cash.eu/src/i18n" ) @@ -20,8 +19,8 @@ type templateData struct { Printers map[string]i18n.Printer Code, Type, FilterBy string Year int - CountryMintages dbx.CountryMintageData - YearMintages dbx.YearMintageData + CountryMintages CountryMintageTable + YearMintages YearMintageTable Countries []country } @@ -30,6 +29,7 @@ var ( errorTmpl *template.Template templates map[string]*template.Template funcmap = map[string]any{ + "evenp": evenp, "ifElse": ifElse, "locales": i18n.Locales, "map": templateMakeMap, @@ -132,6 +132,10 @@ func templateMakeMap(args ...any) map[string]any { return m } +func evenp(n int) bool { + return n&1 == 0 +} + func ifElse(b bool, x, y any) any { if b { return x |