summaryrefslogtreecommitdiffhomepage
path: root/src/mintage/mintage.go
blob: 0e98bd1b0fc94e781305592816762a15eb3fc147 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package mintage

type Data struct {
	Standard      []SRow
	Commemorative []CRow
}

type SRow struct {
	Year      int
	Mintmark  string
	Mintages  [denoms]int
	Reference string
}

type CRow struct {
	Year      int
	Name      string
	Mintmark  string
	Mintage   int
	Reference string
}

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)
	}
}