2 Star 0 Fork 0

g_boot / chkboot-common

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
field_fill.go 633 Bytes
一键复制 编辑 原始数据 按行查看 历史
flyfly 提交于 2023-12-01 17:12 . fix: 修改包路径
/*
* @Descripttion: 字段默认值填充函数
* @version:
* @Author: lfzxs@qq.com
* @Date: 2023-11-15 14:01:17
* @LastEditors: lfzxs@qq.com
* @LastEditTime: 2023-12-01 17:11:34
*/
package libService
import (
"gitee.com/g_boot/chkboot-common/library/libUtils"
"github.com/gogf/gf/v2/util/guid"
"github.com/google/uuid"
)
type FildFillFunc func() string
var FunMap = map[string]FildFillFunc{
"uuid": Uuid,
"snowflakeId": SnowflakeId,
"uid": Uid,
}
func Uuid() string {
return uuid.NewString()
}
func SnowflakeId() string {
return libUtils.SnowflakeIdStr()
}
func Uid() string {
return guid.S()
}
Go
1
https://gitee.com/g_boot/chkboot-common.git
git@gitee.com:g_boot/chkboot-common.git
g_boot
chkboot-common
chkboot-common
v1.0.1

搜索帮助

53164aa7 5694891 3bd8fe86 5694891