zls-go: github.com/sohaha/zls-go Index | Files

package zls

import "github.com/sohaha/zls-go"

Package zls is golang daily development of some commonly used functions set

See http://docs.73zls.com/

Index

Package Files

doc.go is.go map.go string.go to.go util.go

Constants

const (
    // StrPadRight 字符串右边填充
    StrPadRight int = iota
    // StrPadLeft 字符串左边填充
    StrPadLeft
)

func GetType Uses

func GetType(s interface{}) string

GetType 获取变量类型

func IsBool Uses

func IsBool(v interface{}) bool

IsBool 是否布尔值

func IsByte Uses

func IsByte(v interface{}) bool

IsByte 是否[]byte

func IsDir Uses

func IsDir(path string) bool

IsDir 是否是一个存在目录

func IsFile Uses

func IsFile(path string) bool

IsFile 是否是一个存在文件

func IsFloat32 Uses

func IsFloat32(v interface{}) bool

IsFloat32 是否float32

func IsFloat64 Uses

func IsFloat64(v interface{}) bool

IsFloat64 是否float64

func IsInt Uses

func IsInt(v interface{}) bool

IsInt 是否int

func IsInt16 Uses

func IsInt16(v interface{}) bool

IsInt16 是否int16

func IsInt32 Uses

func IsInt32(v interface{}) bool

IsInt32 是否int32

func IsInt64 Uses

func IsInt64(v interface{}) bool

IsInt64 是否int64

func IsInt8 Uses

func IsInt8(v interface{}) bool

IsInt8 是否int8

func IsInterface Uses

func IsInterface(v interface{}) bool

IsInterface 是否interface{}

func IsString Uses

func IsString(v interface{}) bool

IsString 是否字符串

func IsStruct Uses

func IsStruct(v interface{}) bool

IsStruct 是否结构体

func IsUint Uses

func IsUint(v interface{}) bool

IsUint 是否uint

func IsUint16 Uses

func IsUint16(v interface{}) bool

IsUint16 是否uint16

func IsUint32 Uses

func IsUint32(v interface{}) bool

IsUint32 是否uint32

func IsUint64 Uses

func IsUint64(v interface{}) bool

IsUint64 是否uint64

func IsUint8 Uses

func IsUint8(v interface{}) bool

IsUint8 是否uint8

func MapKeyExists Uses

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

MapKeyExists 字典下标是否存在

func PathExists Uses

func PathExists(path string) (int, error)

PathExists 路径是否存在 1存在并且是一个目录路径,2存在并且是一个文件路径,0不存在

func StrLen Uses

func StrLen(str string) int

StrLen 字符串长度(中文)

func StrPad Uses

func StrPad(raw string, length int, padStr string, padType int) string

StrPad 字符串填充

func ToBool Uses

func ToBool(i interface{}) bool

ToBool 变量转布尔值

func ToByte Uses

func ToByte(i interface{}) []byte

ToByte 变量转[]byte

func ToFloat32 Uses

func ToFloat32(i interface{}) float32

ToFloat32 变量转float32

func ToFloat64 Uses

func ToFloat64(i interface{}) float64

ToFloat64 变量转float64

func ToInt Uses

func ToInt(i interface{}) int

ToInt 变量转int

func ToInt16 Uses

func ToInt16(i interface{}) int16

ToInt16 变量转int16

func ToInt32 Uses

func ToInt32(i interface{}) int32

ToInt32 变量转int32

func ToInt64 Uses

func ToInt64(i interface{}) int64

ToInt64 变量转int64

func ToInt8 Uses

func ToInt8(i interface{}) int8

ToInt8 变量转int8

func ToString Uses

func ToString(i interface{}) string

ToString 变量转字符串

func ToUint Uses

func ToUint(i interface{}) uint

ToUint 变量转uint

func ToUint16 Uses

func ToUint16(i interface{}) uint16

ToUint16 变量转uint16

func ToUint32 Uses

func ToUint32(i interface{}) uint32

ToUint32 变量转uint32

func ToUint64 Uses

func ToUint64(i interface{}) uint64

ToUint64 变量转uint64

func ToUint8 Uses

func ToUint8(i interface{}) uint8

ToUint8 变量转uint8

Package zls imports 7 packages (graph). Updated 2019-03-14. Refresh now. Tools for package owners.