xutil

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerLine

func CallerLine(skip int) string

CallerLine ...

func CallerLines

func CallerLines(skip int) []string

CallerLines ...

func GetEnv

func GetEnv(name string, defaultValues ...string) string

GetEnv ...

func GetEnvMap

func GetEnvMap() map[string]string

GetEnvMap ...

func If

func If(cond bool, val1, val2 interface{}) interface{}

If 三目运算

func InArray

func InArray(elem interface{}, target interface{}) bool

InArray ...

func IsArray

func IsArray(elem interface{}) bool

IsArray ...

func IsBool

func IsBool(elem interface{}) bool

IsBool ...

func IsChannel

func IsChannel(elem interface{}) bool

IsChannel ...

func IsEmpty

func IsEmpty(elem interface{}) bool

IsEmpty ...

func IsFloat

func IsFloat(elem interface{}) bool

IsFloat ...

func IsFunc

func IsFunc(elem interface{}) bool

IsFunc ...

func IsInt

func IsInt(elem interface{}) bool

IsInt ...

func IsJSONObject

func IsJSONObject(elem interface{}) bool

IsJSONObject ...

func IsJSONString

func IsJSONString(str string) bool

IsJSONString ...

func IsLinux

func IsLinux() bool

IsLinux ...

func IsMac

func IsMac() bool

IsMac ...

func IsMap

func IsMap(elem interface{}) bool

IsMap ...

func IsNumeric

func IsNumeric(elem interface{}) bool

IsNumeric ...

func IsSlice

func IsSlice(elem interface{}) bool

IsSlice ...

func IsString

func IsString(elem interface{}) bool

IsString ...

func IsStruct

func IsStruct(elem interface{}) bool

IsStruct ...

func IsTime

func IsTime(elem interface{}) bool

IsTime ...

func IsUint

func IsUint(elem interface{}) bool

IsUint ...

func IsWin

func IsWin() bool

IsWin ...

func ParseQuery

func ParseQuery(str string) map[string]string

ParseQuery ...

func ParseURL

func ParseURL(str string) (*url.URL, error)

ParseURL ...

func Pretty

func Pretty(v interface{}) string

Pretty ...

func RandNumber

func RandNumber(min, max int) int

RandNumber ...

func RandString

func RandString(length int) string

RandString ...

func Range

func Range(min, max int) []int

Range ...

func Replace

func Replace(elem string, replace map[string]string) string

Replace ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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