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:
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user