diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-09 02:51:27 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-09 02:51:27 +0200 |
commit | 52db1d03e5067de4ba77c3a12465149d268eb3d1 (patch) | |
tree | 96286b94957e2546a789cbdcad2677b6f03b0973 /src/templates.go | |
parent | 09defec0a015e7ddb118bd453ea2925a5cb9d5dc (diff) |
Begin migration towards SQLite
Diffstat (limited to 'src/templates.go')
-rw-r--r-- | src/templates.go | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/src/templates.go b/src/templates.go index f6413d9..28b7700 100644 --- a/src/templates.go +++ b/src/templates.go @@ -7,13 +7,13 @@ import ( "log" "strings" - "git.thomasvoss.com/euro-cash.eu/src/mintage" + "git.thomasvoss.com/euro-cash.eu/src/dbx" ) type templateData struct { Printer Printer Code, Type string - Mintages [3]mintage.Data + Mintages dbx.MintageData Countries []country } @@ -24,13 +24,12 @@ var ( errorTmpl = buildTemplate("-error") templates map[string]*template.Template funcmap = map[string]any{ - "denoms": denoms, - "locales": locales, - "safe": asHTML, - "sprintf": fmt.Sprintf, - "strToCtype": strToCtype, - "toUpper": strings.ToUpper, - "tuple": templateMakeTuple, + "denoms": denoms, + "locales": locales, + "safe": asHTML, + "sprintf": fmt.Sprintf, + "toUpper": strings.ToUpper, + "tuple": templateMakeTuple, } ) @@ -83,17 +82,6 @@ func templateMakeTuple(args ...any) []any { return args } -func strToCtype(s string) int { - switch s { - case "nifc": - return mintage.TypeNifc - case "proof": - return mintage.TypeProof - default: - return mintage.TypeCirc - } -} - func (td templateData) T(fmt string, args ...any) string { return td.Printer.T(fmt, args...) } |