package
Version:
v1.2.1
Opens a new window with list of versions in this module.
Published: Jul 1, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Cause 返回由 errors.New、errors.Wrap、errors.Wrapf 中包裹的 cause error。
error 如果不是上述方法产生的则会返回其本身
Json 返回 error 序列化为 JSON 的字符串,如果 error 实现了 Json 方法则
调用 Json 方法返回字符串。未实现 Json 方法则返回:
{"cause":err.Error()}
Wrapf 返回包含堆栈信息的 error。format 格式化信息会保存到堆栈信息中
type Jsoner interface {
Json() string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.