Documentation ¶
Index ¶
- Variables
- func ArrayOfBytes(i int, b byte) (p []byte)
- func BigIntJoin(expectedLen int, bigs ...*big.Int) *big.Int
- func Bytes2BigInt(b []byte) *big.Int
- func FitBytesInto(d []byte, i int) []byte
- func Map(f interface{}, vs interface{}) interface{}
- func SplitBig(b *big.Int, parts int) []*big.Int
- func StripByte(d []byte, b byte) []byte
- func Timeout(i time.Duration) chan bool
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = logrus.New()
Logger is new logrus logger instantiate.
Functions ¶
func ArrayOfBytes ¶
create an array filled with b ArrayOfBytes(3,0) => [0 0 0]
func BigIntJoin ¶
Join bigInt, and padding it when less than `expectedLen`.
func FitBytesInto ¶
func Map ¶
func Map(f interface{}, vs interface{}) interface{}
Map Example:
numbers := []int{1, 2, 3} fmt.Println("Square", numbers, f.Map(func(x int) int { return x * x }, numbers))
origin by: https://github.com/izqui/functional
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.