goutil

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2015 License: GPL-2.0, Apache-2.0 Imports: 2 Imported by: 0

README

goutil -> itertools

wercker status

Iterate - function which turns all typically iterable objects into object accepted by the range function

Range - function to create a generator similar to the xrange python function.

Pair - a type, which is in line with the c++ Pair object

Map - function which allows us to iterate over Slice, Array, chan and Map types and execute a function on each of the elements in those structures.

CMap - version of the Map function which will loop and run the function concurrently using go routines.

Filter - function which acts as a generator filtering the passed in iterable object of values which do equate to true according to the passed in evaluation function

CFilter - concurrent version of Filter using go routines

FilterFalse - function which acts as a generator filtering the passed in iterable object of values which do not equate to true according to the passed in evaluation function ( this function has the exact opposite effect as Filter )

CFilterFalse - concurrent cersion of FilterFalse using go routines

ZipLongest - Make an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with fillvalue. Iteration continues until the longest iterable is exhausted

Zip - Make an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, indexes with missing values are dropped.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallChain

func CallChain(preverr error, functor interface{}, iargs ...interface{}) (responseInterfaceArray []interface{}, err error)

func CallChainP

func CallChainP(preverr error, responseInterfaceArray []interface{}, functor interface{}, iargs ...interface{}) (err error)

func Empty

func Empty() *unpackEmpty

func Unpack

func Unpack(packedValues []interface{}, unpackedPointers ...interface{}) (err error)

func UnpackArray

func UnpackArray(packedValues []interface{}, unpackedPointers []interface{}) (err error)

Types

type Chain

type Chain struct {
	Error error
}

func NewChain

func NewChain(err error) (chain *Chain)

func (*Chain) Call

func (s *Chain) Call(functor interface{}, iargs ...interface{}) (responseInterfaceArray []interface{}, err error)

func (*Chain) CallP

func (s *Chain) CallP(responseInterfaceArray []interface{}, functor interface{}, iargs ...interface{}) (err error)

func (*Chain) Returns

func (s *Chain) Returns(args ...interface{}) []interface{}

type GetSet

type GetSet struct{}

func (*GetSet) Get

func (s *GetSet) Get(i interface{}, n string) interface{}

func (*GetSet) Set

func (s *GetSet) Set(i interface{}, n string, val interface{})

type GetSetter

type GetSetter interface {
	Get(n string) interface{}
	Set(n string, val interface{})
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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