# Functions
BinaryPow 返回2的n次方.
BufferReset 重置buffer底层的切片 Reset the buffer's underlying slice 注意:修改后面的属性一定要加偏移量,否则可能会导致未定义的行为。 Note: Be sure to add an offset when modifying the following properties, otherwise it may lead to undefined behavior.
向上取整float64.
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
GetAddrFromURL 根据URL获取网络连接地址 Get the network connection address based on the URL.
No description provided by the author
No description provided by the author
时间转换为int 如(20230101).
获取两个时间差多少小时.
No description provided by the author
GetIntersectionElem 获取两个字符串切片 a 和 b 的交集中的一个元素 Gets an element in the intersection of two string slices a and b.
No description provided by the author
No description provided by the author
No description provided by the author
获取指定时间到现在多少天.
用字符串格式化时间.
20247.
20240625.
202447.
获取0点时间.
获取传入时间的零点时刻的时间戳.
GUID 产生新的GUID.
No description provided by the author
No description provided by the author
Checks if the given string elem is in the string slice elems.
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
IsLastDayOfMonth 检查当前时间是否是所在月份的最后一天.
No description provided by the author
IsToday 检查给定的时间戳是否表示今天的日期.
IsYesterday 判断给定的时间是否是昨天.
IsZero 零值判断.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MaskXOR 计算掩码.
No description provided by the author
MD5 md5加密.
MethodExists if nil return false.
No description provided by the author
NewNode returns a new snowflake node that can be used to generate snowflake IDs.
*
* 通过string获得一个[]string
* @param str 10,1000,1000,1000
* @param sep1 分隔符 ","
*/.
ParseBase2 converts a Base2 string into a snowflake ID.
ParseInt64 converts an int64 into a snowflake ID.
ParseString converts a string into a snowflake ID.
No description provided by the author
PostForm 发送http post请求数据为form.
No description provided by the author
No description provided by the author
包含上下限 [min, max].
不包含下限 (min, max].
不包含上限 [min, max).
都不包含 (min, max).
No description provided by the author
*
*随机权重
*randData map[int]int{索引:权重,索引:权重}
*return 索引
*/.
RoundFloat 使用 math.Round 将浮点数 f 四舍五入到小数点后 n 位。.
No description provided by the author
No description provided by the author
2维int转1维string.
2维int转string.
No description provided by the author
No description provided by the author
Split 分割给定的字符串 s,使用 sep 作为分隔符。空值将会被过滤掉。 Splits the given string s using sep as the separator.
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
StructToValues 将结构体转换为 url.Values.
No description provided by the author
No description provided by the author
No description provided by the author
Token 产生新的用户登录验证码.
删除空切片(字节).
表情转换.
表情解码.
No description provided by the author
No description provided by the author
No description provided by the author
校验结构体的字段是否为空.
WithDefault 如果原值为零值, 返回新值, 否则返回原值.
# Variables
It's a RandomString instance with an alphanumeric character set.
2020-01-01 08:00:00 UTC/GMT in millseconds.
NodeBits holds the number of bits to use for Snowflake Remember, you have a total 22 bits to share between Snowflake/Step.
It's a RandomString instance with a numeric character set.
StepBits holds the number of bits to use for Step Remember, you have a total 22 bits to share between Snowflake/Step.
No description provided by the author
# Structs
random string generator.
No description provided by the author
No description provided by the author
# Type aliases
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