Documentation ¶
Index ¶
- type MapInterface
- func (receiver MapInterface) Delete(key interface{}) MapInterface
- func (receiver MapInterface) Exists(key interface{}) bool
- func (receiver MapInterface) Get(key interface{}) interface{}
- func (receiver MapInterface) Keys() (interface{}, error)
- func (receiver MapInterface) Length() interface{}
- func (receiver MapInterface) Merge(source MapInterface) MapInterface
- func (receiver MapInterface) Put(key interface{}, value interface{}) MapInterface
- func (receiver MapInterface) Values() interface{}
- type Utility
- func (receiver *Utility) Append(sliceInterface interface{}, item ...interface{}) (interface{}, error)
- func (receiver *Utility) Concatenate(sliceInterface1 interface{}, sliceInterface2 interface{}) (interface{}, error)
- func (receiver *Utility) FieldSlice(slice interface{}, fieldName string) (interface{}, error)
- func (receiver *Utility) Hash(slice interface{}, keyField string) (MapInterface, error)
- func (receiver *Utility) Map(pairs ...interface{}) (MapInterface, error)
- func (receiver *Utility) Sequence(begin, end int) interface{}
- func (receiver *Utility) Slice(items ...interface{}) interface{}
- func (receiver *Utility) Sort(slice interface{}, order string) (interface{}, error)
- func (receiver *Utility) SubSlice(sliceInterface interface{}, begin int, end int) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MapInterface ¶
type MapInterface map[interface{}]interface{}
MapInterface is the alias of map[interface{}]interface{} what have operation methods
func (MapInterface) Delete ¶
func (receiver MapInterface) Delete(key interface{}) MapInterface
Delete removes the specified value related to given key from the map
func (MapInterface) Exists ¶
func (receiver MapInterface) Exists(key interface{}) bool
Exists returns if the key is in the map or not
func (MapInterface) Get ¶
func (receiver MapInterface) Get(key interface{}) interface{}
Get gets the value related to given key from the map
func (MapInterface) Keys ¶
func (receiver MapInterface) Keys() (interface{}, error)
Keys returns its keys as an slice
func (MapInterface) Length ¶
func (receiver MapInterface) Length() interface{}
Length returns its length
func (MapInterface) Merge ¶
func (receiver MapInterface) Merge(source MapInterface) MapInterface
Merge merges the given map into this map
func (MapInterface) Put ¶
func (receiver MapInterface) Put(key interface{}, value interface{}) MapInterface
Put puts given value into the map
func (MapInterface) Values ¶
func (receiver MapInterface) Values() interface{}
Values returns its values as an slice
type Utility ¶
type Utility struct { }
Utility handles collection operation
func (*Utility) Append ¶
func (receiver *Utility) Append(sliceInterface interface{}, item ...interface{}) (interface{}, error)
Append returns a slice appended given items
func (*Utility) Concatenate ¶
func (receiver *Utility) Concatenate(sliceInterface1 interface{}, sliceInterface2 interface{}) (interface{}, error)
Concatenate returns a slice concatenated two slices
func (*Utility) FieldSlice ¶
FieldSlice returns a slice of specified field value from given struct slice
func (*Utility) Hash ¶
func (receiver *Utility) Hash(slice interface{}, keyField string) (MapInterface, error)
Hash makes a map from given struct slice with the specified field as the key
func (*Utility) Map ¶
func (receiver *Utility) Map(pairs ...interface{}) (MapInterface, error)
Map makes a map from given pairs
func (*Utility) Slice ¶
func (receiver *Utility) Slice(items ...interface{}) interface{}
Slice returns a slice object which consists of given items