MCPcopy
hub / github.com/TomWright/dasel / MapKeyExists

Method MapKeyExists

model/value_map.go:76–82  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

74}
75
76func (v *Value) MapKeyExists(key string) (bool, error) {
77 _, err := v.GetMapKey(key)
78 if err != nil && !errors.As(err, &MapKeyNotFound{}) {
79 return false, err
80 }
81 return err == nil, nil
82}
83
84// GetMapKey returns the value at the specified key in the map.
85func (v *Value) GetMapKey(key string) (*Value, error) {

Callers 7

TestMapKeyExistsFunction · 0.95
ensureMapAtFunction · 0.80
ensureSliceAtFunction · 0.80
decodeHCLBlockMethod · 0.80
func_has.goFile · 0.80
groupByExprExecutorFunction · 0.80
deepMergeMapFunction · 0.80

Calls 1

GetMapKeyMethod · 0.95

Tested by 1

TestMapKeyExistsFunction · 0.76