xutil

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: MIT Imports: 8 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

CompareNumber ...

func CompareString added in v0.0.4

func CompareString(a, b interface{}) int

CompareString ...

func GetEnv

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

GetEnv ...

func GetEnvMap

func GetEnvMap() map[string]string

GetEnvMap ...

func GetExternalIP added in v0.0.5

func GetExternalIP() string

GetExternalIP 获取公网 IP

func GetIntranetIP added in v0.0.5

func GetIntranetIP() string

GetIntranetIP 获取内网 IP

func If

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

If 三目运算

func IsExternalIP added in v0.0.5

func IsExternalIP(ip string) bool

IsExternalIP 是否是公网 IP

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