xutil

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

* @Date: 2023-07-20 09:34:46 * @LastEditTime: 2023-07-20 10:26:35 * @Description:

* @Date: 2023-07-20 10:23:00 * @LastEditTime: 2023-07-20 10:23:01 * @Description:

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 ConvertToIntIP

func ConvertToIntIP(ip string) (int, error)

ConvertToIntIP 转换ip为int

func GetExternalIP

func GetExternalIP() string

GetExternalIP 获取公网 IP

func GetIntranetIP

func GetIntranetIP() string

GetIntranetIP 获取内网 IP

func GetLocalIpToInt

func GetLocalIpToInt() (int, error)

GetLocalIpToInt 获取本机IP转成int

func GetLocalMacAddr

func GetLocalMacAddr() (string, error)

GetLocalMacAddr @Description: get local mac address @return string @return error @author cx

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