gopsu

package module
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: GPL-3.0 Imports: 41 Imported by: 19

README

gopsu

golang perhaps something userful

里面包含一些从网上收集的功能方法,同时也不断重构一些自己需要的功能模块,如,日志,配置文件,队列等。

useage: go get -u github.com/xyzj/gopsu

Documentation

Overview

Package gopsu : 收集,保存的一些常用方法

Index

Constants

View Source
const (
	// OSNAME from runtime
	OSNAME = runtime.GOOS
	// OSARCH from runtime
	OSARCH = runtime.GOARCH
	// DateTimeFormat yyyy-mm-dd hh:MM:ss
	DateTimeFormat = "2006-01-02 15:04:05"
	// DateOnlyFormat yyyy-mm-dd hh:MM:ss
	DateOnlyFormat = "2006-01-02"
	// TimeOnlyFormat yyyy-mm-dd hh:MM:ss
	TimeOnlyFormat = "15:04:05"
	// LongTimeFormat 含日期的日志内容时间戳格式 2006/01/02 15:04:05.000
	LongTimeFormat = "2006-01-02 15:04:05.000"
	// ShortTimeFormat 无日期的日志内容时间戳格式 15:04:05.000
	ShortTimeFormat = "15:04:05.000"
	// FileTimeFormat 日志文件命名格式 060102
	FileTimeFormat = "060102" // 日志文件命名格式
)
View Source
const (
	// CryptoMD5 md5算法
	CryptoMD5 = iota
	// CryptoSHA256 sha256算法
	CryptoSHA256
	// CryptoSHA512 sha512算法
	CryptoSHA512
	// CryptoHMACSHA1 hmacsha1摘要算法
	CryptoHMACSHA1
	// CryptoHMACSHA256 hmacsha256摘要算法
	CryptoHMACSHA256
	// CryptoAES128CBC aes128cbc算法
	CryptoAES128CBC
	// CryptoAES128CFB aes128cfb算法
	CryptoAES128CFB
	// CryptoAES192CBC aes192cbc算法
	CryptoAES192CBC
	// CryptoAES192CFB aes192cfb算法
	CryptoAES192CFB
	// CryptoAES256CBC aes256cbc算法
	CryptoAES256CBC
	// CryptoAES256CFB aes256cfb算法
	CryptoAES256CFB
)

Variables

View Source
var (
	// DefaultLogDir 默认日志文件夹
	DefaultLogDir = filepath.Join(GetExecDir(), "..", "log")
	// DefaultCacheDir 默认缓存文件夹
	DefaultCacheDir = filepath.Join(GetExecDir(), "..", "cache")
	// DefaultConfDir 默认配置文件夹
	DefaultConfDir = filepath.Join(GetExecDir(), "..", "conf")
)

Functions

func Base64Imgfile

func Base64Imgfile(b, f string) error

Base64Imgfile base64码保存为图片

func Base64URLDecode

func Base64URLDecode(data string) ([]byte, error)

Base64URLDecode url解码

func Base64UrlSafeEncode

func Base64UrlSafeEncode(source []byte) string

Base64UrlSafeEncode url safe 编码

func Bcd2Int8

func Bcd2Int8(v byte) byte

Bcd2Int8 bcd to int

func Bcd2STime

func Bcd2STime(b []byte) int32

Bcd2STime bcd转hh*60+mm

func BcdBytes2Float64

func BcdBytes2Float64(b []byte, decimal int, unsigned bool) float64

BcdBytes2Float64 bcd数组转浮点(小端序)

b:bcd数组
d:小数位数
Unsigned:无符号的

func BcdBytes2Float64BigOrder

func BcdBytes2Float64BigOrder(b []byte, decimal int, unsigned bool) float64

BcdBytes2Float64BigOrder bcd数组转浮点(大端序)

b:bcd数组
d:小数位数
Unsigned:无符号的

func BcdDT2Stamp

func BcdDT2Stamp(d []byte) int64

BcdDT2Stamp bcd时间戳转unix

func Byte2Bytes

func Byte2Bytes(v byte, reverse bool) []byte

Byte2Bytes int8 to bytes

func Byte2Int32s

func Byte2Int32s(v byte, reverse bool) []int32

Byte2Int32s int8 to int32 list

func Byte2SignedInt32

func Byte2SignedInt32(b byte) int32

Byte2SignedInt32 转有符号整型

func Bytes added in v1.3.3

func Bytes(s string) []byte

Bytes 内存地址转换string

func Bytes2Float32

func Bytes2Float32(b []byte, bigOrder bool) float32

Bytes2Float32 字节数组转单精度浮点,bigOrder==true,高位在前

func Bytes2Float64

func Bytes2Float64(b []byte, bigOrder bool) float64

Bytes2Float64 字节数组转双精度浮点,bigOrder==true,高位在前

func Bytes2Int64

func Bytes2Int64(b []byte, bigorder bool) int64

Bytes2Int64 字节数组转换为int64

b-字节数组
bigorder-是否高位在前
false低位在前

func Bytes2String

func Bytes2String(data []byte, sep string) string

Bytes2String convert []byte to hex-string

 args:
	data: 输入字节切片
	sep: 用于分割字符串的分割字符
 return:
	字符串

func Bytes2Uint64

func Bytes2Uint64(b []byte, bigorder bool) uint64

Bytes2Uint64 字节数组转换为uint64

b-字节数组
bigorder-是否高位在前
false低位在前

func CacheMarshal

func CacheMarshal(v interface{}) ([]byte, error)

CacheMarshal 将数据进行序列化后压缩,可做数据缓存

func CacheUnmarshal

func CacheUnmarshal(b []byte, v interface{}) error

CacheUnmarshal 将压缩的数据反序列化,参数v必须专递结构地址

func CalcCRC32

func CalcCRC32(b []byte, bigorder bool) []byte

CalcCRC32 计算crc32,返回[]byte

func CalcCRC32String

func CalcCRC32String(b []byte) string

CalcCRC32String 计算crc32,返回16进制字符串

func CalculateSecurityCode

func CalculateSecurityCode(t, salt string, offset int) []string

CalculateSecurityCode calculate security code

 args:
	t: calculate type "h"-按小时计算,当分钟数在偏移值范围内时,同时计算前后一小时的值,"m"-按分钟计算,同时计算前后偏移量范围内的值
	salt: 拼接用字符串
	offset: 偏移值,范围0~59
 return:
	32位小写md5码切片

func CheckCrc16VB

func CheckCrc16VB(d []byte) bool

CheckCrc16VB check crc16 data

func CheckCrc16VBBigOrder

func CheckCrc16VBBigOrder(d []byte) bool

CheckCrc16VBBigOrder check crc16 data,use big order

func CheckIP

func CheckIP(ip string) bool

CheckIP check if the ipstring is legal

 args:
	ip: ipstring something like 127.0.0.1:10001
 return:
	true/false

func CheckLrc

func CheckLrc(d []byte) bool

CheckLrc check lrc data

func CheckRCMru

func CheckRCMru(d []byte) bool

CheckRCMru 校验电表数据

func CheckSQLInject

func CheckSQLInject(s string) bool

CheckSQLInject 检查sql语句是否包含注入攻击

func CodeString

func CodeString(s string) string

CodeString 编码字符串

func CompressData

func CompressData(src []byte, t ArchiveType) []byte

CompressData 使用gzip,zlib压缩数据

func CopyFile

func CopyFile(src, dst string) (int64, error)

CopyFile 复制文件

func CountCrc16VB

func CountCrc16VB(data *[]byte) []byte

CountCrc16VB count crc16 as vb6 do

func CountLrc

func CountLrc(data *[]byte) byte

CountLrc count lrc data

func CountRCMru

func CountRCMru(d []byte) byte

CountRCMru 计算电表校验码

func DFM2GPS

func DFM2GPS(du, fen int, miao float64) float64

DFM2GPS 度分秒转经纬度

func DecodeString

func DecodeString(s string) string

DecodeString 解码混淆字符串,兼容python算法

func DecodeStringOld

func DecodeStringOld(s string) string

DecodeStringOld 解码混淆字符串,兼容python算法

func DoZlibCompress

func DoZlibCompress(src []byte) []byte

DoZlibCompress zlib compress

func DoZlibUnCompress

func DoZlibUnCompress(src []byte) []byte

DoZlibUnCompress zlib uncompress

func EncodeUTF16BE

func EncodeUTF16BE(s string) []byte

EncodeUTF16BE 将字符串编码成utf16be的格式,用于cdma短信发送

func EraseSyncMap added in v1.3.5

func EraseSyncMap(m *sync.Map)

EraseSyncMap 清空sync.map

func ExternalIP

func ExternalIP() string

ExternalIP 返回v4地址

func ExternalIPV6

func ExternalIPV6() string

ExternalIPV6 返回v6地址

func Float32ToByte added in v1.3.5

func Float32ToByte(float float32) []byte

Float32ToByte 32位浮点转bytes

func Float642BcdBytes

func Float642BcdBytes(v float64, f string) []byte

Float642BcdBytes 浮点转bcd字节数组(小端序)

v:十进制浮点数值
f:格式化的字符串,如"%07.03f","%03.0f"

func Float642BcdBytesBigOrder

func Float642BcdBytesBigOrder(v float64, f string) []byte

Float642BcdBytesBigOrder 浮点转bcd字节数组(大端序)

v:十进制浮点数值
f:格式化的字符串,如"%07.03f","%03.0f"

func Float64ToByte added in v1.3.5

func Float64ToByte(float float64) []byte

Float64ToByte 64位浮点转bytes

func FormatFileSize added in v1.3.3

func FormatFileSize(fileSize int64) (size string)

FormatFileSize 字节的单位转换

func FormatFloat64 added in v1.3.3

func FormatFloat64(f float64, p int) float64

FormatFloat64 格式化浮点精度,f-浮点数,p-小数位数

func GPS2DFM

func GPS2DFM(l float64) (int, int, float64)

GPS2DFM 经纬度转度分秒

func GetAddrFromString

func GetAddrFromString(straddr string) ([]int64, error)

GetAddrFromString get addr from config string

straddr: something like "1,2,3-6" return: []int64,something like []int64{1,2,3,4,5,6}

func GetClientTLSConfig

func GetClientTLSConfig(certfile, keyfile, rootca string) (*tls.Config, error)

GetClientTLSConfig 获取https配置

certfile: 双向验证时客户端证书
keyfile: 双向验证时客户端key
rootca: 服务端根证书

func GetExecDir

func GetExecDir() string

GetExecDir get current file path

func GetExecName added in v1.3.3

func GetExecName() string

GetExecName 获取可执行文件的名称

func GetExecNameWithoutExt added in v1.3.5

func GetExecNameWithoutExt() string

GetExecNameWithoutExt 获取可执行文件的名称,去除扩展名

func GetMD5

func GetMD5(text string) string

GetMD5 生成32位md5字符串

func GetRandomASCII

func GetRandomASCII(l int64) []byte

GetRandomASCII 获取随机ascII码字符串

func GetRandomString

func GetRandomString(l int64, letteronly ...bool) string

GetRandomString 生成随机字符串

func GetServerTLSConfig

func GetServerTLSConfig(certfile, keyfile, clientca string) (*tls.Config, error)

GetServerTLSConfig 获取https配置

certfile: 服务端证书
keyfile: 服务端key
clientca: 双向验证时客户端根证书

func GetTCPPort

func GetTCPPort() (int, error)

GetTCPPort 获取随机可用端口

func GetUUID1

func GetUUID1() string

GetUUID1 returns a Version 1 UUID based on the current NodeID and clock sequence, and the current time. If the NodeID has not been set by SetNodeID or SetNodeInterface then it will be set automatically. If the NodeID cannot be set NewUUID returns nil. If clock sequence has not been set by SetClockSequence then it will be set automatically. If GetTime fails to return the current NewUUID returns nil and an error.

In most cases, New should be used.

func GlobalIPs

func GlobalIPs() ([]string, []string, error)

GlobalIPs 返回所有可访问ip ipv4 list,ipv6 list

func HashData

func HashData(b []byte, cryptoType byte) string

HashData 计算hash

func HexString2Bytes

func HexString2Bytes(s string, bigorder bool) []byte

HexString2Bytes 转换hexstring为字节数组

s-hexstring(11aabb)
bigorder-是否高位在前
false低位在前

func IP2Int64

func IP2Int64(ipnr string) int64

IP2Int64 change ip string data to int64 format

func IP2Uint

func IP2Uint(ipnr string) uint

IP2Uint change ip string data to int64 format

func IPInt642Bytes

func IPInt642Bytes(ipnr int64) []byte

IPInt642Bytes change ip int64 data to string format

func IPInt642String

func IPInt642String(ipnr int64) string

IPInt642String change ip int64 data to string format

func IPUint2Bytes

func IPUint2Bytes(ipnr int64) []byte

IPUint2Bytes change ip int64 data to string format

func IPUint2String

func IPUint2String(ipnr uint) string

IPUint2String change ip int64 data to string format

func Imgfile2Base64

func Imgfile2Base64(s string) (string, error)

Imgfile2Base64 图片转base64

func Int642Bytes

func Int642Bytes(i int64, bigOrder bool) []byte

Int642Bytes 无符号长整形转换字节数组(8位),bigOrder==true,高位在前

func Int82Bcd

func Int82Bcd(v byte) byte

Int82Bcd int to bcd

func IsExist

func IsExist(p string) bool

IsExist file is exist or not

func JSON2PB

func JSON2PB(js string, pb interface{}) error

JSON2PB json字符串转pb2格式

func JoinPathFromHere

func JoinPathFromHere(path ...string) string

JoinPathFromHere 从程序执行目录开始拼接路径

func LastSlice added in v1.3.3

func LastSlice(s, sep string) string

LastSlice 返回切片的最后一个元素

func MakeRuntimeDirs

func MakeRuntimeDirs(rootpath string) (string, string, string)

MakeRuntimeDirs make conf,log,cache dirs Args: rootpath: 输入路径 return: conf,log,cache三个文件夹的完整路径

func PB2Json

func PB2Json(pb interface{}) []byte

PB2Json pb2格式转换为json []byte格式

func PB2String

func PB2String(pb interface{}) string

PB2String pb2格式转换为json 字符串格式

func RealIP

func RealIP(v6first bool) string

RealIP 返回本机的v4或v6ip

func ReverseString

func ReverseString(s string) string

ReverseString ReverseString

func SMSUnicode

func SMSUnicode(s string) []string

SMSUnicode 编码短信

func STime2Bcd

func STime2Bcd(t int32) []byte

STime2Bcd hh*60+mm转BCD

func SignedBytes2Int64 added in v1.3.5

func SignedBytes2Int64(b []byte) int64

SignedBytes2Int64 有符号字节数组转int64,低前

func SignedInt322Byte

func SignedInt322Byte(i int32) byte

SignedInt322Byte 有符号整型转byte

func SlicesDifference

func SlicesDifference(slice1, slice2 []string) []string

SlicesDifference 求差集 slice1-并集

func SlicesIntersect

func SlicesIntersect(slice1, slice2 []string) []string

SlicesIntersect 求交集

func SlicesUnion

func SlicesUnion(slice1, slice2 []string) []string

SlicesUnion 求并集

func SplitDateTime

func SplitDateTime(sdt int64) (y, m, d, h, mm, s, wd byte)

SplitDateTime SplitDateTime

func SplitStringWithLen

func SplitStringWithLen(s string, l int) []string

SplitStringWithLen 按制定长度分割字符串

s-原始字符串
l-切割长度

func Stamp2BcdDT

func Stamp2BcdDT(dt int64) []byte

Stamp2BcdDT unix时间戳转bcd,6字节,第一字节为秒

func Stamp2Time

func Stamp2Time(t int64, fmt ...string) string

Stamp2Time convert stamp to datetime string

func String added in v1.3.3

func String(b []byte) string

String 内存地址转换[]byte

func String2Byte added in v1.3.5

func String2Byte(s string, t int) byte

String2Byte convert string 2 one byte

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	byte

func String2Bytes

func String2Bytes(data string, sep string) []byte

String2Bytes convert hex-string to []byte

 args:
	data: 输入字符串
	sep: 用于分割字符串的分割字符
 return:
	字节切片

func String2Float32 added in v1.3.5

func String2Float32(s string) float32

String2Float32 convert string 2 float64

func String2Float64

func String2Float64(s string) float64

String2Float64 convert string 2 float64

func String2Int

func String2Int(s string, t int) int

String2Int convert string 2 int

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	int

func String2Int32

func String2Int32(s string, t int) int32

String2Int32 convert string 2 int32

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	int32

func String2Int64

func String2Int64(s string, t int) int64

String2Int64 convert string 2 int64

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	int64

func String2Int8

func String2Int8(s string, t int) byte

String2Int8 convert string 2 int8

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	int8

func String2UInt64 added in v1.3.5

func String2UInt64(s string, t int) uint64

String2UInt64 convert string 2 uint64

 args:
	s: 输入字符串
	t: 返回数值进制
 Return:
	uint64

func String2Unicode

func String2Unicode(s string) string

String2Unicode 字符串转4位unicode编码

func StringSlice2Int8

func StringSlice2Int8(bs []string) byte

StringSlice2Int8 convert string Slice 2 int8

func SwapCase

func SwapCase(s string) string

SwapCase swap char case

func SwitchStamp

func SwitchStamp(t int64) int64

SwitchStamp switch stamp format between unix and c#

func Time2Stamp

func Time2Stamp(s string) int64

Time2Stamp convert datetime string to stamp

func Time2StampNB

func Time2StampNB(s string) int64

Time2StampNB 电信NB平台数据时间戳转为本地unix时间戳

func Time2Stampf

func Time2Stampf(s, fmt string, tz float32) int64

Time2Stampf 可根据制定的时间格式和时区转换为当前时区的Unix时间戳

	s:时间字符串
 fmt:时间格式
 year:2006,month:01,day:02
 hour:15,minute:04,second:05
 tz:0~12,超范围时使用本地时区

func TrimString

func TrimString(s string) string

TrimString 去除字符串末尾的空格,\r\n

func Uint642Bytes

func Uint642Bytes(i uint64, bigOrder bool) []byte

Uint642Bytes 长整形转换字节数组(8位),bigOrder==true,高位在前

func UnZIPFile

func UnZIPFile(archive, target string) error

UnZIPFile 解压缩文件

func UncompressData

func UncompressData(src []byte, t ArchiveType, dstlen ...interface{}) []byte

UncompressData 使用gzip,zlib解压缩数据

func VersionInfo

func VersionInfo(p, v, gv, bd, pl, a string) string

VersionInfo show something

p: program name v: program version gv: golang version bd: build datetime pl: platform info a: auth name

func WriteVersionInfo

func WriteVersionInfo(p, v, gv, bd, pl, a string)

WriteVersionInfo write version info to .ver file

 args:
	p: program name
	v: program version
	gv: golang version
	bd: build datetime
	pl: platform info
	a: auth name

func ZIPFile

func ZIPFile(d, s string, delold bool) error

ZIPFile 压缩文件

func ZIPFiles

func ZIPFiles(dstName string, srcFiles []string, newDir string) error

ZIPFiles 压缩多个文件

Types

type ArchiveType added in v1.3.3

type ArchiveType byte

ArchiveType 压缩编码类型

var (
	// ArchiveZlib zlib压缩/解压缩
	ArchiveZlib ArchiveType = 1
	// ArchiveGZip gzip压缩/解压缩
	ArchiveGZip ArchiveType = 2
	//ArchiveSnappy snappy压缩,解压缩
	ArchiveSnappy ArchiveType = 3
)

type ArchiveWorker

type ArchiveWorker struct {
	// contains filtered or unexported fields
}

ArchiveWorker 压缩管理器,避免重复New

func GetNewArchiveWorker

func GetNewArchiveWorker(archiveType ArchiveType) *ArchiveWorker

GetNewArchiveWorker 获取新的压缩管理器

func (*ArchiveWorker) Compress

func (a *ArchiveWorker) Compress(src []byte) []byte

Compress 压缩

func (*ArchiveWorker) Uncompress

func (a *ArchiveWorker) Uncompress(src []byte) []byte

Uncompress 解压缩

type ConfData

type ConfData struct {
	// contains filtered or unexported fields
}

ConfData 配置文件结构体

func LoadConfig

func LoadConfig(fullpath string) (*ConfData, error)

LoadConfig load config file

func (*ConfData) AddOrUpdate added in v1.3.5

func (c *ConfData) AddOrUpdate(key, value, tip string)

AddOrUpdate 更新配置项

func (*ConfData) Clear

func (c *ConfData) Clear()

Clear 清除所有配置项

func (*ConfData) DelItem

func (c *ConfData) DelItem(key string)

DelItem 删除配置项

func (*ConfData) FullPath

func (c *ConfData) FullPath() string

FullPath 配置文件完整路径

func (*ConfData) GetAll

func (c *ConfData) GetAll() string

GetAll 获取所有配置项的key,value,以json字符串返回

func (*ConfData) GetItem

func (c *ConfData) GetItem(key string) (string, error)

GetItem 获取配置项的value

func (*ConfData) GetItemDefault

func (c *ConfData) GetItemDefault(key, value string, remark ...string) string

GetItemDefault 获取配置项的value

func (*ConfData) GetKeys

func (c *ConfData) GetKeys() []string

GetKeys 获取所有配置项的key

func (*ConfData) Len

func (c *ConfData) Len() int

Len 获取配置数量

func (*ConfData) Reload

func (c *ConfData) Reload() error

Reload reload config file

func (*ConfData) Save

func (c *ConfData) Save() error

Save 保存配置文件

func (*ConfData) SetFullPath added in v1.3.5

func (c *ConfData) SetFullPath(p string)

SetFullPath 设置配置文件目录

func (*ConfData) SetItem

func (c *ConfData) SetItem(key, value, tip string) bool

SetItem 设置配置项

func (*ConfData) UpdateItem

func (c *ConfData) UpdateItem(key, value string) bool

UpdateItem 更新配置项

type CryptoWorker

type CryptoWorker struct {
	// contains filtered or unexported fields
}

CryptoWorker 序列化或加密管理器

func GetNewCryptoWorker

func GetNewCryptoWorker(cryptoType byte) *CryptoWorker

GetNewCryptoWorker 获取新的序列化或加密管理器 md5,sha256,sha512初始化后直接调用hash hmacsha1初始化后需调用SetSignKey设置签名key后调用hash aes加密算法初始化后需调用SetKey设置key和iv后调用Encrypt,Decrypt

func (*CryptoWorker) Decrypt

func (h *CryptoWorker) Decrypt(s string) string

Decrypt 解密

func (*CryptoWorker) Encrypt

func (h *CryptoWorker) Encrypt(s string) string

Encrypt 加密

func (*CryptoWorker) EncryptNoTail

func (h *CryptoWorker) EncryptNoTail(s string) string

EncryptNoTail 加密,去掉base64尾巴的=符号

func (*CryptoWorker) Hash

func (h *CryptoWorker) Hash(b []byte) string

Hash 计算序列

func (*CryptoWorker) SetKey

func (h *CryptoWorker) SetKey(key, iv string) error

SetKey 设置aes-key,iv

type SliceFlag added in v1.3.5

type SliceFlag []string

SliceFlag 切片型参数,仅支持字符串格式

func (*SliceFlag) Set added in v1.3.5

func (f *SliceFlag) Set(value string) error

Set 设置值

func (*SliceFlag) String added in v1.3.5

func (f *SliceFlag) String() string

String 返回参数

type StringSliceSort

type StringSliceSort struct {
	OneDimensional []string
	TwoDimensional [][]string
	Idx            int
	Order          string
}

StringSliceSort 字符串数组排序

func (*StringSliceSort) Len

func (arr *StringSliceSort) Len() int

func (*StringSliceSort) Less

func (arr *StringSliceSort) Less(i, j int) bool

func (*StringSliceSort) Swap

func (arr *StringSliceSort) Swap(i, j int)

type Time added in v1.3.3

type Time int64

A Time represents a time as the number of 100's of nanoseconds since 15 Oct 1582.

Directories

Path Synopsis
Package cache : 数据缓存模块,可定时清理过期数据
Package cache : 数据缓存模块,可定时清理过期数据
Package db : 数据库模块,封装了常用方法,可缓存数据,可依据配置自动创建myisam引擎的子表,支持mysql和sqlserver
Package db : 数据库模块,封装了常用方法,可缓存数据,可依据配置自动创建myisam引擎的子表,支持mysql和sqlserver
Package email : email emtp发送模块
Package email : email emtp发送模块
Package games : 搜罗的一些网页小游戏
Package games : 搜罗的一些网页小游戏
geo
Package geohash : go版的redis-geo模块,貌似有内存泄露问题,待查找和修正,目前不建议使用
Package geohash : go版的redis-geo模块,貌似有内存泄露问题,待查找和修正,目前不建议使用
Package json : 使用 github.com/bytedance/sonic 替代 encoding/json,性能更好
Package json : 使用 github.com/bytedance/sonic 替代 encoding/json,性能更好
Package logger 日志专用写入器,可设置是否自动依据日期以及文件大小滚动日志文件
Package logger 日志专用写入器,可设置是否自动依据日期以及文件大小滚动日志文件
Package loopfunc : 用于控制需要持续运行的循环方法,当方法漰溃时会自动重启
Package loopfunc : 用于控制需要持续运行的循环方法,当方法漰溃时会自动重启
Package queue 队列模块 HLQueue: wlst tcp module 定制模块,内部分为高低优先级2个队列,高优先级队列可设置先进先出或先进后出,低优先级队列只能先进先出。
Package queue 队列模块 HLQueue: wlst tcp module 定制模块,内部分为高低优先级2个队列,高优先级队列可设置先进先出或先进后出,低优先级队列只能先进先出。
Package rate provides a rate limiter.
Package rate provides a rate limiter.

Jump to

Keyboard shortcuts

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