Documentation
¶
Index ¶
- Constants
- func GoVer() string
- func GoVerEq[T Number](major, minor T, patch ...T) bool
- func GoVerGt[T Number](major, minor T, patch ...T) bool
- func GoVerLt[T Number](major, minor T, patch ...T) bool
- func Md5File(fs io.Reader) string
- func Md5Str(str string) string
- func Md5Str16(str string) string
- func Must(in error, msg ...string)
- func MustFalse(in bool, msg ...string)
- func MustTrue(in bool, msg ...string)
- func MustZero[T Number](in T, msg ...string)
- func MustZeroN[T Number](in T, msg ...string)
- func RandNumStr[T Number](n T) string
- func RandStr[T Number](n T) string
- type NetworkInfo
- type Number
Constants ¶
View Source
const ( StringLetter = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" NumberLetter = "0123456789" )
Variables ¶
This section is empty.
Functions ¶
func GoVerEq ¶
GoVerEq 当前Go环境是否 等于 指定版本
- major 目标主版本号 Number类型(如:1)
- minor 目标次版本号 Number类型(如:18)
- patch 目标修订版本号(可选) Number类型(如:2) 不传默认为0
func GoVerGt ¶
GoVerGt 当前Go环境是否 大于 指定版本
- major 目标主版本号 Number类型(如:1)
- minor 目标次版本号 Number类型(如:18)
- patch 目标修订版本号(可选) Number类型(如:2) 不传默认为0
Types ¶
type NetworkInfo ¶
type NetworkInfo struct {
Name string `json:"name"`
Mac string `json:"mac"`
Ipv4 []string `json:"ipv4"`
Ipv6 []string `json:"ipv6"`
}
func NetworkInfoList ¶
func NetworkInfoList() (list []*NetworkInfo, err error)
NetworkInfoList 获取当前主机网络信息
注: 每张(启用/非环回/非虚拟)网卡的所有(全局单播)网络
Click to show internal directories.
Click to hide internal directories.