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

comment: add comment for Unwrap

This commit is contained in:
dudaodong
2022-01-24 10:24:10 +08:00
parent 2878d389c8
commit acc8b59387
2 changed files with 3 additions and 3 deletions

View File

@@ -612,5 +612,5 @@ func main() {
- Function list:
```go
Unwrap[T any](val T, err error)
Unwrap[T any](val T, err error) //if err is nil then it returns a valid value otherwise it panics
```

View File

@@ -592,7 +592,7 @@ func IsWeakPassword(password string) bool //判断字符串是否是弱密码(
### 14. error helpers
- Contain functions to handle errors
- 错误处理函数
- Usage: import "github.com/duke-git/lancet/xerror"
```go
@@ -613,5 +613,5 @@ func main() {
- Function list:
```go
Unwrap[T any](val T, err error)
Unwrap[T any](val T, err error) //如果err是nil返回有效的val值。否则 panics
```