Documentation
¶
Index ¶
- func As(err error, target any) bool
- func Errorf(format string, args ...any) error
- func Is(err, target error) bool
- func New(msg string) error
- func Trace(err error) slog.LogValuer
- func TraceJSON(err error) string
- func TraceString(err error) string
- func Unwrap(err error) error
- func Wrap(err error, msg ...string) error
- func Wrapf(err error, format string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TraceString ¶ added in v1.22.13
TraceString 获取error日志追踪的字符串表示,兼容任意第三方日志库(如 zap、logrus 等)。 使用 fmt.Sprintf("%+v", err) 可获取相同信息,TraceString 提供更简洁的调用方式。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.