mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
15 lines
219 B
Go
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
|
|
}
|