go-zero/core/mapping/valuer.go
2020-07-26 17:09:05 +08:00

15 lines
219 B
Go

package mapping
type (
Valuer interface {
Value(key string) (interface{}, bool)
}
MapValuer map[string]interface{}
)
func (mv MapValuer) Value(key string) (interface{}, bool) {
v, ok := mv[key]
return v, ok
}