package
Version:
v0.5.40
Opens a new window with list of versions in this module.
Published: Nov 10, 2022
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
ID 获取ID.
package main
import (
"fmt"
"github.com/xuender/oils/dbs"
)
func main() {
fmt.Println(dbs.ID())
fmt.Println(dbs.ID())
}
Output:
NewID 新建ID.
num 4位 16个.
起始日期 2021-10-31 日.
合计53位,js中使用不会出错.
package main
import (
"fmt"
"github.com/xuender/oils/dbs"
)
func main() {
fmt.Println(dbs.NewID(3))
id := dbs.ID()
fmt.Println(id)
fmt.Println(dbs.DecodeID(id))
}
Output:
Rand 随机数,兼容JS数值长度.
package main
import (
"fmt"
"github.com/xuender/oils/dbs"
)
func main() {
fmt.Println(dbs.Rand())
}
Output:
Source Files
¶
Directories
¶
|
Package cache 简单的内存缓存. |
|
Package gorms 数据库操作. |
|
|
Click to show internal directories.
Click to hide internal directories.