1
0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-09-18 23:02:57 +00:00
badge-gen/configStore.go

32 lines
364 B
Go
Raw Normal View History

2016-07-05 13:48:57 +00:00
package main
type configStorage map[string]interface{}
func (c configStorage) Str(name string) string {
v, ok := c[name]
if !ok {
return ""
}
if sv, ok := v.(string); ok {
return sv
}
return ""
}
func (c configStorage) Int64(name string) int64 {
v, ok := c[name]
if !ok {
return 0
}
if sv, ok := v.(int64); ok {
return sv
}
return 0
}