xutil

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: MIT Imports: 10 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 GetExternalIP added in v0.0.5

func GetExternalIP() string

GetExternalIP 获取公网 IP

func GetIntranetIP added in v0.0.5

func GetIntranetIP() string

GetIntranetIP 获取内网 IP

func Getenv added in v0.0.6

func Getenv(key string, defaults ...string) string

Getenv ...

func GetenvMap added in v0.0.6

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 Parse added in v0.0.6

func Parse(obj interface{}, path string) interface{}

Parse ...

func Replace

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

Replace ...

func Setenv added in v0.0.6

func Setenv(key, value string) error

Setenv ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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