Categorygithub.com/zhaocy/go-util
modulepackage
0.0.12
Repository: https://github.com/zhaocy/go-util.git
Documentation: pkg.go.dev

# README

go-util

for Go dev

# tag eg.
git tag -a v0.0.1 -m "release 0.0.1"
git push origin tag v0.0.1
# 到github release 页面创建release
 

# Functions

计算精度(当计算的绝对值小于1时,取1).
No description provided by the author
isSymbol表示有无符号.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
游戏积分结果比较.
No description provided by the author
No description provided by the author
算法计算 RA RB 段位分.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
找到字符串中大写字母的列表,附属于HumpToUnderLine.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
计算N天之后.
获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。.
获取下个月的第一天.
获取下下个月的第一天.
获取下下个月的第一天(返回Long).
获取传入的时间所在月份的最后一天,即某月最后一天的0点。如传入time.Now(), 返回当前月份的最后一天0点时间。.
获取下个月的最后一天.
生成32位md5字串.
计算下一个月份1号.
No description provided by the author
No description provided by the author
No description provided by the author
获取某一天的0点时间.
HasLocalIP 检测 IP 地址是否是内网地址.
HasLocalIPddr 检测 IP 地址字符串是否是内网地址.
No description provided by the author
驼峰转下划线.
(三元运算).
是否在数组.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
整形转换成字节.
判断是否为空.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewNode returns a new snowflake node that can be used to generate snowflake IDs.
No description provided by the author
No description provided by the author
No description provided by the author
ParseBase2 converts a Base2 string into a snowflake ID.
ParseBase32 parses a base32 []byte into a snowflake ID NOTE: There are many different base32 implementations so becareful when doing any interoperation.
ParseBase36 converts a Base36 string into a snowflake ID.
ParseBase58 parses a base58 []byte into a snowflake ID.
ParseBase64 converts a base64 string into a snowflake ID.
ParseBytes converts a byte slice into a snowflake ID.
ParseInt64 converts an int64 into a snowflake ID.
ParseIntBytes converts an array of bytes encoded as big endian integer as a snowflake ID.
ParseString converts a string into a snowflake ID.
No description provided by the author
产生panic时的调用栈打印.
No description provided by the author
No description provided by the author
No description provided by the author
增强型split,对 a,,,,,,,b,,c 以","进行切割成[a,b,c].
附属于Split,可独立使用.
No description provided by the author
生成Guid字串.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Epoch is set to the twitter snowflake epoch of Nov 04 2010 01:42:54 UTC in milliseconds You may customize this to set a different epoch for your application.
ErrInvalidBase32 is returned by ParseBase32 when given an invalid []byte.
ErrInvalidBase58 is returned by ParseBase58 when given an invalid []byte.
NodeBits holds the number of bits to use for Node Remember, you have a total 22 bits to share between Node/Step.
StepBits holds the number of bits to use for Step Remember, you have a total 22 bits to share between Node/Step.
No description provided by the author

# Structs

A JSONSyntaxError is returned from UnmarshalJSON if an invalid ID is provided.
No description provided by the author
A Node struct holds the basic information needed for a snowflake generator node.
No description provided by the author
No description provided by the author

# Type aliases

An ID is a custom type used for a snowflake ID.