errs

package
v0.59.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package errs 提供额外的错误处理功能

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errors added in v0.59.1

func Errors(err ...error) error

Errors 合并多个非空错误为一个错误

有关 Is 和 As 均是按顺序找第一个返回 true 的即返回。

func StackError added in v0.59.1

func StackError(err error) error

StackError 为 err 带上调用信息

位置从调用 StackError 开始。 如果 err 为 nil,则返回 nil,如果 err 本身就为 StackError 返回的类型,则原样返回。

如果需要输出调用堆栈信息,需要指定 %+v 标记。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳