convert

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 6 Imported by: 3

README

go-convert

Simple transit from interface to standard GO types.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(in interface{}, debugKeys ...string) bool

func BoolErr

func BoolErr(in interface{}, debugKeys ...string) (bool, error)

func CheckMapStringType

func CheckMapStringType(t interface{}) (map[string]interface{}, bool)

func Float32

func Float32(in interface{}, debugKeys ...string) float32

func Float32Err

func Float32Err(in interface{}, debugKeys ...string) (float32, error)

func Float64

func Float64(in interface{}, debugKeys ...string) float64

func Float64Err

func Float64Err(in interface{}, debugKeys ...string) (float64, error)

func Int

func Int(in interface{}, debugKeys ...string) int

func Int32

func Int32(in interface{}, debugKeys ...string) int32

func Int32Err

func Int32Err(in interface{}, debugKeys ...string) (int32, error)

func Int64

func Int64(in interface{}, debugKeys ...string) int64

func Int64Err

func Int64Err(in interface{}, debugKeys ...string) (int64, error)

func ListOfInt32Err

func ListOfInt32Err(in interface{}, checkLen bool, debugKeys ...string) ([]int32, error)

func ListOfInt64Err

func ListOfInt64Err(in interface{}, checkLen bool, debugKeys ...string) ([]int64, error)

func ListOfStrings added in v0.0.3

func ListOfStrings(in interface{}, checkLen bool, debugKeys ...string) []string

func ListOfStringsErr added in v0.0.3

func ListOfStringsErr(in interface{}, checkLen bool, debugKeys ...string) ([]string, error)

func ListOfStringsP added in v0.0.3

func ListOfStringsP(in interface{}, checkLen bool, debugKeys ...string) []string

func ListOfStringsPErr added in v0.0.3

func ListOfStringsPErr(in interface{}, checkLen bool, debugKeys ...string) ([]string, error)

func String

func String(in interface{}, debugKeys ...string) string

func StringTS added in v0.1.3

func StringTS(in interface{}, debugKeys ...string) string

String Trim spaces

func Uint32

func Uint32(in interface{}, debugKeys ...string) uint32

func Uint32Err

func Uint32Err(in interface{}, debugKeys ...string) (uint32, error)

func Uint64

func Uint64(in interface{}, debugKeys ...string) uint64

func Uint64Err

func Uint64Err(in interface{}, debugKeys ...string) (uint64, error)

Types

type It

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

func Iterator

func Iterator(i interface{}, checkLen ...bool) (*It, error)

func (*It) Len

func (it *It) Len() int

func (*It) NextNotEmptyString

func (it *It) NextNotEmptyString() string

func (*It) NextNotNil

func (it *It) NextNotNil() interface{}

func (*It) NextNotNilMapString

func (it *It) NextNotNilMapString() map[string]interface{}

type MapIt added in v0.1.1

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

func MapIterator added in v0.1.1

func MapIterator(i interface{}, checkLen ...bool) (*MapIt, error)

func (*MapIt) HasNext added in v0.1.1

func (it *MapIt) HasNext() bool

func (*MapIt) Len added in v0.1.1

func (it *MapIt) Len() int

func (*MapIt) Next added in v0.1.1

func (it *MapIt) Next() (interface{}, interface{})

Jump to

Keyboard shortcuts

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