gitee.com/lonely0422/gometalinter.git@v3.0.1-0.20190307123442-32416ab75314+incompatible/_linters/src/github.com/stretchr/objx/tests.go (about) 1 package objx 2 3 // Has gets whether there is something at the specified selector 4 // or not. 5 // 6 // If m is nil, Has will always return false. 7 func (m Map) Has(selector string) bool { 8 if m == nil { 9 return false 10 } 11 return !m.Get(selector).IsNil() 12 } 13 14 // IsNil gets whether the data is nil or not. 15 func (v *Value) IsNil() bool { 16 return v == nil || v.data == nil 17 }