util

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var False = &Bool{false}
View Source
var True = &Bool{true}

Functions

func KeysForMapStringInterface

func KeysForMapStringInterface(obj map[string]interface{}) []string

func PutAllForMapStringInterface

func PutAllForMapStringInterface(dest map[string]interface{}, source map[string]interface{})

func Timeout added in v0.0.4

func Timeout(d time.Duration) chan bool

func ToString

func ToString(val interface{}) string

Types

type Bool added in v0.0.5

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

func BoolFor added in v0.0.5

func BoolFor(val bool) *Bool

func (*Bool) Value added in v0.0.5

func (b *Bool) Value() bool

type Iterator added in v0.0.6

type Iterator interface {
	HasNext() bool
	Next() interface{}
}

func NewRangeIterator added in v0.0.6

func NewRangeIterator(from int, to int, step int) (Iterator, error)

to: inclusive

func NewSliceIterator added in v0.0.6

func NewSliceIterator(s []interface{}) (Iterator, error)

type StopWatch

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

func NewStopWatch

func NewStopWatch() *StopWatch

func (*StopWatch) Since

func (t *StopWatch) Since() time.Duration

func (*StopWatch) Start

func (t *StopWatch) Start() *StopWatch

func (*StopWatch) Stop

func (t *StopWatch) Stop() *StopWatch

func (*StopWatch) Time

func (t *StopWatch) Time() time.Duration

type Values

type Values interface {
	Get(string) interface{}
	GetString(string) string
	AsMap() map[string]interface{}
}

func AsStringValues

func AsStringValues(vals map[string]string) Values

func AsValues

func AsValues(vals map[string]interface{}) Values

Jump to

Keyboard shortcuts

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