generic

package
v6.21.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(collection, item interface{}) bool

func Each

func Each(collection Map, cb Iterator)

func IsMappable

func IsMappable(value interface{}) bool

func IsSliceable

func IsSliceable(value interface{}) bool

Types

type ConcreteMap

type ConcreteMap map[interface{}]interface{}

func (*ConcreteMap) Count

func (data *ConcreteMap) Count() int

func (*ConcreteMap) Delete

func (data *ConcreteMap) Delete(key interface{})

func (*ConcreteMap) Except

func (data *ConcreteMap) Except(keys []interface{}) Map

func (*ConcreteMap) Get

func (data *ConcreteMap) Get(key interface{}) interface{}

func (*ConcreteMap) Has

func (data *ConcreteMap) Has(key interface{}) bool

func (*ConcreteMap) IsEmpty

func (data *ConcreteMap) IsEmpty() bool

func (*ConcreteMap) IsNil

func (data *ConcreteMap) IsNil(key interface{}) bool

func (*ConcreteMap) Keys

func (data *ConcreteMap) Keys() (keys []interface{})

func (*ConcreteMap) NotNil

func (data *ConcreteMap) NotNil(key interface{}) bool

func (*ConcreteMap) Set

func (data *ConcreteMap) Set(key, value interface{})

func (*ConcreteMap) String

func (data *ConcreteMap) String() string

type Iterator

type Iterator func(key, val interface{})

type Map

type Map interface {
	IsEmpty() bool
	Count() int
	Keys() []interface{}
	Has(key interface{}) bool
	Except(keys []interface{}) Map
	IsNil(key interface{}) bool
	NotNil(key interface{}) bool
	Get(key interface{}) interface{}
	Set(key interface{}, value interface{})
	Delete(key interface{})
	String() string
}

func DeepMerge

func DeepMerge(maps ...Map) Map

func Merge

func Merge(collection, otherCollection Map) Map

func NewMap

func NewMap(data ...interface{}) Map

func Reduce

func Reduce(collections []Map, resultVal Map, cb Reducer) Map

type Reducer

type Reducer func(key, val interface{}, reducedVal Map) Map

Jump to

Keyboard shortcuts

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