module
Version:
v0.0.7
Opens a new window with list of versions in this module.
Published: Jun 27, 2025
License: MIT
Opens a new window with license information.
README
¶
介绍 Description
这个库是自己常用的一些函数功能,所以很多是没营养价值的封装,轻喷
为什么有这个库?
1、写代码常遇到以下问题,你是否也一样?
问题 |
例如 |
已解决版本 |
已解决版本 |
有的结构类型缺少常用的函数 |
获取 map 的 keys 切片 |
map.Keys() |
Go 1.23 |
|
判断 key 在不在 slice 里面 |
slices.Contains() |
Go 1.21 |
有些函数调用起来代码一长串 |
为了获取 map[string]any 中的某个 key 值每次都需要断言类型 |
/ |
/ |
有些函数会返回多余的参数 |
json.Marshal() 必须接收 err |
/ |
/ |
2、从其他老师们学习借鉴来的功能,记录一下方便使用。
模块名称 |
例如 |
text_to_image |
文本转图片 |
3、如果能帮助你少造轮子,那就是我的荣幸!
模块介绍
模块 |
功能 |
备注 |
common |
slice、map、string 的处理转换 |
|
crypto |
加解密相关 |
|
datetime |
日期时间处理 |
|
expression |
语义表达式解析与执行 |
已弃用!有需要请使用 pkg/expression |
hash |
哈希相关 |
|
image |
图像处理 |
|
struct |
结构体 |
|
system |
系统相关 |
|
test |
测试代码 |
|
Directories
¶
Click to show internal directories.
Click to hide internal directories.