functions

package
v0.0.0-...-7a729f8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandomNumber

func CreateRandomNumber(count int) string

生成指定位数的随机数字

func CreateRandomString

func CreateRandomString(count int) string

生成指定长度的随机字符串

func GetAccountIdFromToken

func GetAccountIdFromToken(tokenStr string, key []byte) (accoutId string, err error)

func GetIdlePorts

func GetIdlePorts(count int, start int) []int

func GetIntV

func GetIntV(i interface{}) (int, error)

func IsIntranet

func IsIntranet(ip string) bool

IsIntranet 判断是否是内网,只支持ipv4

func IsLocalIP

func IsLocalIP(ip string) (bool, error)

判断IP是否是本地的IP(IPV4和IPV6)

func IsNumeric

func IsNumeric(str string) bool

判断一个字符串是纯数字

func LocalPortMap

func LocalPortMap(src int, dest int, ctx context.Context) (err error)

本地端口映射

func PathSplit

func PathSplit(path string) []string

func Str2Uint

func Str2Uint(idStr string) (id uint, err error)

公共方法

Types

This section is empty.

Jump to

Keyboard shortcuts

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