ztype

package
v0.1.50 Latest Latest
Warning

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

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

Documentation

Overview

Package ztype provides Variable Type Related Operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetType

func GetType(s interface{}) string

GetType Get variable type

func InArray added in v0.0.19

func InArray(needle, hystack interface{}) bool

func IsBool

func IsBool(v interface{}) bool

IsBool Is Bool

func IsByte

func IsByte(v interface{}) bool

IsByte Is []byte

func IsEmpty added in v0.0.19

func IsEmpty(value interface{}) bool

func IsFloat32

func IsFloat32(v interface{}) bool

IsFloat32 Is float32

func IsFloat64

func IsFloat64(v interface{}) bool

IsFloat64 Is float64

func IsInt

func IsInt(v interface{}) bool

IsInt Is int

func IsInt16

func IsInt16(v interface{}) bool

IsInt16 Is int16

func IsInt32

func IsInt32(v interface{}) bool

IsInt32 Is int32

func IsInt64

func IsInt64(v interface{}) bool

IsInt64 Is int64

func IsInt8

func IsInt8(v interface{}) bool

IsInt8 Is int8

func IsInterface

func IsInterface(v interface{}) bool

IsInterface Is interface{}

func IsString

func IsString(v interface{}) bool

IsString Is String

func IsStruct

func IsStruct(v interface{}) bool

IsStruct Is Struct

func IsUint

func IsUint(v interface{}) bool

IsUint Is uint

func IsUint16

func IsUint16(v interface{}) bool

IsUint16 Is uint16

func IsUint32

func IsUint32(v interface{}) bool

IsUint32 Is uint32

func IsUint64

func IsUint64(v interface{}) bool

IsUint64 Is uint64

func IsUint8

func IsUint8(v interface{}) bool

IsUint8 Is uint8

func MapKeyExists

func MapKeyExists(key interface{}, m map[interface{}]interface{}) bool

MapKeyExists Whether the dictionary key exists

func ReflectPtr added in v0.0.19

func ReflectPtr(r reflect.Value) reflect.Value

func Slice added in v0.0.19

func Slice(value interface{}) []interface{}

func ToBool

func ToBool(i interface{}) bool

ToBool to Bool

func ToByte

func ToByte(i interface{}) []byte

ToByte to []byte

func ToFloat32

func ToFloat32(i interface{}) float32

ToFloat32 to float32

func ToFloat64

func ToFloat64(i interface{}) float64

ToFloat64 to float64

func ToInt

func ToInt(i interface{}) int

ToInt to int

func ToInt16

func ToInt16(i interface{}) int16

ToInt16 to int16

func ToInt32

func ToInt32(i interface{}) int32

ToInt32 to int32

func ToInt64

func ToInt64(i interface{}) int64

ToInt64 to int64

func ToInt8

func ToInt8(i interface{}) int8

ToInt8 to int8

func ToMapString added in v0.0.19

func ToMapString(value interface{}, tags ...string) map[string]interface{}

ToMapString ToMapString

func ToMapStringDeep added in v0.0.19

func ToMapStringDeep(value interface{}, tags ...string) map[string]interface{}

func ToSliceMapString added in v0.0.19

func ToSliceMapString(value interface{}, tags ...string) []map[string]interface{}

ToSliceMapString ToSliceMapString

func ToString

func ToString(i interface{}) string

ToString to String

func ToUint

func ToUint(i interface{}) uint

ToUint to uint

func ToUint16

func ToUint16(i interface{}) uint16

ToUint16 to uint16

func ToUint32

func ToUint32(i interface{}) uint32

ToUint32 to uint32

func ToUint64

func ToUint64(i interface{}) uint64

ToUint64 to uint64

func ToUint8

func ToUint8(i interface{}) uint8

ToUint8 to uint8

Types

type StructEngin added in v0.0.19

type StructEngin struct {
	Fields        []interface{}
	Result        []map[string]interface{}
	TagName       string
	TagIgnoreName string
	ExtraCols     []string
}

func Struct added in v0.0.19

func Struct() *StructEngin

func (*StructEngin) AppendFields added in v0.0.19

func (s *StructEngin) AppendFields(arg interface{})

func (*StructEngin) AppendResult added in v0.0.19

func (s *StructEngin) AppendResult(arg map[string]interface{})

func (*StructEngin) GetFields added in v0.0.19

func (s *StructEngin) GetFields() []interface{}

func (*StructEngin) GetResult added in v0.0.19

func (s *StructEngin) GetResult() []map[string]interface{}

func (*StructEngin) GetStructFields added in v0.0.19

func (s *StructEngin) GetStructFields(data interface{}) []interface{}

func (*StructEngin) GetTagIgnoreName added in v0.0.19

func (s *StructEngin) GetTagIgnoreName() string

func (*StructEngin) GetTagName added in v0.0.19

func (s *StructEngin) GetTagName() string

func (*StructEngin) SetExtraCols added in v0.0.19

func (s *StructEngin) SetExtraCols(args []string) *StructEngin

func (*StructEngin) SetFields added in v0.0.19

func (s *StructEngin) SetFields(arg []interface{})

func (*StructEngin) SetResult added in v0.0.19

func (s *StructEngin) SetResult(arg []map[string]interface{})

func (*StructEngin) SetTagIgnoreName added in v0.0.19

func (s *StructEngin) SetTagIgnoreName(arg string) *StructEngin

func (*StructEngin) SetTagName added in v0.0.19

func (s *StructEngin) SetTagName(arg string) *StructEngin

func (*StructEngin) ToMap added in v0.0.19

func (s *StructEngin) ToMap(data interface{}) []map[string]interface{}

Jump to

Keyboard shortcuts

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