18 lines
225 B
Go
18 lines
225 B
Go
package dict
|
|
|
|
type Dict map[string]interface{}
|
|
|
|
func New() Dict {
|
|
return make(Dict)
|
|
}
|
|
|
|
func IsDict(a interface{}) bool {
|
|
_, ok := a.(Dict)
|
|
return ok
|
|
}
|
|
|
|
func (d Dict) HasKey(key string) bool {
|
|
_, ok := d[key]
|
|
return ok
|
|
}
|