xutil

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(a, b interface{}) int

Compare ...

func CompareNumber

func CompareNumber(a, b interface{}) int

CompareNumber ...

func CompareString

func CompareString(a, b interface{}) int

CompareString ...

func Default

func Default[V comparable](v V, de V) V

Default ...

func GetExternalIP

func GetExternalIP() string

GetExternalIP 获取公网 IP

func GetIntranetIP

func GetIntranetIP() string

GetIntranetIP 获取内网 IP

func Getenv

func Getenv(key string, defaults ...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

func Len(s string) int

Len ..

func Parse

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

Parse ...

func Replace

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

Replace ...

func Setenv

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