test&doc: add example and update doc for xerror package

This commit is contained in:
dudaodong committed 2023-01-08 20:36:17 +08:00
1 parent 936011dc3b
commit 7380721ccc
5 files changed
+29 -4

No files matched your search

+5
View File
@@ -1155,6 +1155,11 @@ import "github.com/duke-git/lancet/v2/xerror"
#### 函数列表:
- **<big>Unwrap</big>** : 检查error, 如果err为nil则展开,则它返回一个有效值,如果err不是nil则Unwrap使用err发生panic。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/xerror_zh-CN.md#Unwrap)]
[[play](https://go.dev/play/p/w84d7Mb3Afk)]
- [Unwrap](https://github.com/duke-git/lancet/blob/main/docs/xerror_zh-CN.md#Unwrap)
## 如何贡献代码