helpers

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(ls []interface{}, predicate func(interface{}) bool) interface{}

Find used to find an element in a slice

func IncludeRootInJSON

func IncludeRootInJSON(json interface{}, includeRoot bool, root string) interface{}

IncludeRootInJSON used prepend root in JSON

func Range

func Range(min int, max int) []int

Range used to create slice

func Times

func Times(n int, handler func(int) bool)

Times used to iterate n times with handler

Types

type Dictionary added in v0.0.39

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

Dictionary used to provide accessibilities to dynamic hash

func MakeDictionary added in v0.0.39

func MakeDictionary(properties H) *Dictionary

MakeDictionary used to instantiate dictionary instance

func (*Dictionary) Set added in v0.0.39

func (dict *Dictionary) Set(key string, value interface{})

Set used to set property

func (*Dictionary) Value added in v0.0.39

func (dict *Dictionary) Value(key string) interface{}

Value used to retrieve params value

func (*Dictionary) ValueInt added in v0.0.39

func (dict *Dictionary) ValueInt(key string, fallback int) int

ValueInt used to retrieve params value in int

func (*Dictionary) ValueStr added in v0.0.39

func (dict *Dictionary) ValueStr(key string) string

ValueStr used to retrieve params value in string

type H added in v0.0.34

type H map[string]interface{}

H is alias for map[string]interface{}

Jump to

Keyboard shortcuts

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