1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 06:02:27 +08:00

doc: update doc for random package

This commit is contained in:
dudaodong
2023-12-07 19:13:05 +08:00
parent 6fe8a9efe7
commit 52b8ea8166
3 changed files with 59 additions and 5 deletions

View File

@@ -218,6 +218,32 @@ func main() {
}
```
### <span id="RandSymbolChar">RandSymbolChar</span>
<p>生成给定长度的随机符号字符串. 符号字符包括: !@#$%^&*()_+-=[]{}|;':\",./<>?。</p>
<b>函数签名:</b>
```go
func RandSymbolChar(length int) string
```
<b>示例:</b>
```go
package main
import (
"fmt"
"github.com/duke-git/lancet/v2/random"
)
func main() {
randStr := random.RandSymbolChar(6)
fmt.Println(randStr) //@#(_")
}
```
### <span id="UUIdV4">UUIdV4</span>
<p>生成UUID v4字符串</p>