util

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2013 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareAsSet

func CompareAsSet(expecteds, gots interface{}) (bool, string)

func CompareAsStringSet

func CompareAsStringSet(expecteds, gots []string) (bool, string)

func IndexOfSlice

func IndexOfSlice(a interface{}, list interface{}) int

func IndexOfStringSlice

func IndexOfStringSlice(a string, list []string) int

func RandInt

func RandInt(min int, max int) int

generate a random int from min to max (inclusively). I.e. to get either 1 or 0, use randInt(0,1)

func RemoveElementFromStringSlice

func RemoveElementFromStringSlice(list []string, elem string) []string

func RemoveFromStringSlice

func RemoveFromStringSlice(list []string, i int) []string

func SliceContains

func SliceContains(a interface{}, list interface{}) bool

func StringSliceContains

func StringSliceContains(a string, list []string) bool

func TypeIsBool

func TypeIsBool(typ reflect.Type) bool

func TypeIsNumeric

func TypeIsNumeric(typ reflect.Type) bool

func TypeIsPointerToStruct

func TypeIsPointerToStruct(typ reflect.Type) bool

func TypeIsSliceOrArray

func TypeIsSliceOrArray(typ reflect.Type) bool

func TypeIsString

func TypeIsString(typ reflect.Type) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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