xutil

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare added in v0.0.4

func Compare(a, b interface{}) int

Compare ...

func CompareNumber added in v0.0.4

func CompareNumber(a, b interface{}) int

Number ...

func CompareString added in v0.0.4

func CompareString(a, b interface{}) int

String ...

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 IsLinux

func IsLinux() bool

IsLinux ...

func IsMac

func IsMac() bool

IsMac ...

func IsWin

func IsWin() bool

IsWin ...

func Len added in v0.0.2

func Len(s string) int

Len ..

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(s 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