fix golint issues in core/mapping (#497)
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
package mapping
|
||||
|
||||
type (
|
||||
// A Valuer interface defines the way to get values from the underlying object with keys.
|
||||
Valuer interface {
|
||||
// Value gets the value associated with the given key.
|
||||
Value(key string) (interface{}, bool)
|
||||
}
|
||||
|
||||
// A MapValuer is a map that can use Value method to get values with given keys.
|
||||
MapValuer map[string]interface{}
|
||||
)
|
||||
|
||||
// Value gets the value associated with the given key from mv.
|
||||
func (mv MapValuer) Value(key string) (interface{}, bool) {
|
||||
v, ok := mv[key]
|
||||
return v, ok
|
||||
|
||||
Reference in New Issue
Block a user