1
0
Fork 0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-11-09 13:50:03 +00:00
badge-gen/configStore.go
2016-07-05 15:48:57 +02:00

31 lines
364 B
Go

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
}