Sprig Dictionary

Sprig Dictionary

deepCopy

func deepCopy(arg1 interface{}) interface{}
Takes a value and makes a deep copy of the value.

dictSprig

func dictSprig(args ...interface{}) map[string]interface{}
Create a dictionary.

Aliases

  • dict

dig

func dig(key... ...interface{}) interface{}
Traverses a nested set of dicts, selecting keys from a list of values.
It returns a default value if any of the keys are not found at the
associated dict.

getSprig

func getSprig(dict map[string]interface{}, key string) interface{}
Given a map and a key, get the value from the map.

Aliases

  • get

hasKeySprig

func hasKeySprig(dict map[string]interface{}, key string) bool
Returns 'true' if the given dict contains the given key.

Aliases

  • hasKey

keysSprig

func keysSprig(args ...map[string]interface{}) []string
Returns a list of all of the keys in one or more dict types.

Aliases

  • keys

listSprig

func listSprig(args ...interface{}) []interface{}
Create a list of elements.

Aliases

  • list
  • tuple
  • tupleSprig

mergeOverwrite

func mergeOverwrite(arg1 map[string]interface{}, args
...map[string]interface{}) interface{}
Merge two or more dictionaries into one, giving precedence from
**right to left**, effectively overwriting values in the dest
dictionary.

mergeSprig

func mergeSprig(arg1 map[string]interface{}, args
...map[string]interface{}) interface{}
Merge two or more dictionaries into one, giving precedence to the dest
dictionary.

Aliases

  • merge

omitSprig

func omitSprig(arg1 map[string]interface{}, args ...string)
map[string]interface{}
Is similar to 'pick', except it returns a new `dict` with all the keys
that _do not_ match the given keys.

Aliases

  • omit

pickSprig

func pickSprig(arg1 map[string]interface{}, args ...string)
map[string]interface{}
Selects just the given keys out of a dictionary, creating a new
`dict`.

Aliases

  • pick

pluckSprig

func pluckSprig(name string, dicts ...map[string]interface{}) []interface{}
Makes it possible to give one key and multiple maps, and get a list of
all of the matches.

Aliases

  • pluck

setSprig

func setSprig(dict map[string]interface{}, key string, value interface{})
map[string]interface{}
Add a new key/value pair to a dictionary.

Aliases

  • set

unsetSprig

func unsetSprig(dict map[string]interface{}, key string)
map[string]interface{}
Given a map and a key, delete the key from the map.

Aliases

  • unset

valuesSprig

func valuesSprig(arg1 map[string]interface{}) []interface{}
Is similar to 'keys', except it returns a new 'list' with all the
values of the source 'dict' (only one dictionary is supported).

Aliases

  • values