maps

package
v0.47.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToLower

func ToLower(m map[string]interface{})

ToLower makes all the keys in the given map lower cased and will do so recursively. Notes: * This will modify the map given. * Any nested map[interface{}]interface{} will be converted to map[string]interface{}.

Types

type Scratch added in v0.45.1

type Scratch struct {
	// contains filtered or unexported fields
}

Scratch is a writable context used for stateful operations in Page/Node rendering.

func NewScratch added in v0.45.1

func NewScratch() *Scratch

func (*Scratch) Add added in v0.45.1

func (c *Scratch) Add(key string, newAddend interface{}) (string, error)

Add will, for single values, add (using the + operator) the addend to the existing addend (if found). Supports numeric values and strings.

If the first add for a key is an array or slice, then the next value(s) will be appended.

func (*Scratch) Delete added in v0.45.1

func (c *Scratch) Delete(key string) string

Reset deletes the given key

func (*Scratch) Get added in v0.45.1

func (c *Scratch) Get(key string) interface{}

Get returns a value previously set by Add or Set

func (*Scratch) GetSortedMapValues added in v0.45.1

func (c *Scratch) GetSortedMapValues(key string) interface{}

GetSortedMapValues returns a sorted map previously filled with SetInMap

func (*Scratch) Set added in v0.45.1

func (c *Scratch) Set(key string, value interface{}) string

Set stores a value with the given key in the Node context. This value can later be retrieved with Get.

func (*Scratch) SetInMap added in v0.45.1

func (c *Scratch) SetInMap(key string, mapKey string, value interface{}) string

SetInMap stores a value to a map with the given key in the Node context. This map can later be retrieved with GetSortedMapValues.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL