diff options
author | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 01:32:41 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2025-06-06 01:32:41 +0200 |
commit | 2c726e551d90d20bcd2d78545c369864cc9038e5 (patch) | |
tree | 520615a33c966c729e70e549e859a2c01dc4ba40 /src/mintage/mintage.go | |
parent | 9379ea42a9b0afd1abf705bf3300f03d8bbe79f9 (diff) |
Use CSV’s for mintages
Diffstat (limited to 'src/mintage/mintage.go')
-rw-r--r-- | src/mintage/mintage.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/mintage/mintage.go b/src/mintage/mintage.go new file mode 100644 index 0000000..cc94de7 --- /dev/null +++ b/src/mintage/mintage.go @@ -0,0 +1,40 @@ +package mintage + +type Data struct { + Standard []SRow + Commemorative []CRow +} + +type SRow struct { + Year int + Mintmark string + Mintages [denoms]int +} + +type CRow struct { + Year int + Name string + Mintmark string + Mintage int +} + +const ( + TypeCirc = iota + TypeNifc + TypeProof +) + +const ( + Unknown = -iota - 1 + Invalid +) + +const denoms = 8 + +var cache map[string][3]Data = make(map[string][3]Data) + +func ClearCache(country string) { + if _, ok := cache[country]; ok { + delete(cache, country) + } +} |