errors

package
v1.0.5013 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(errs ...error) error

Join concatenates the elements of err to create a new error.

Types

type Errors

type Errors struct {
	// contains filtered or unexported fields
}

*

  • 错误记录 *
  • @create 2022-8-10
  • @author deatil

func New added in v1.0.4031

func New(errs []error) *Errors

构造函数

func (*Errors) All

func (this *Errors) All() []error

获取全部

func (*Errors) Append

func (this *Errors) Append(errs ...error) *Errors

添加

func (*Errors) Count

func (this *Errors) Count() int

总数

func (*Errors) Error

func (this *Errors) Error() string

实现 error 接口

func (*Errors) First

func (this *Errors) First() error

第一个

func (*Errors) Get

func (this *Errors) Get(n int) error

获取其中一个

func (*Errors) IsNil

func (this *Errors) IsNil() bool

func (*Errors) Last

func (this *Errors) Last() error

最后一个

func (*Errors) Prepend

func (this *Errors) Prepend(errs ...error) *Errors

前置添加

func (*Errors) Range

func (this *Errors) Range(fn func(int, error))

循环

func (*Errors) Reset

func (this *Errors) Reset() *Errors

清空

func (*Errors) String

func (this *Errors) String() string

返回全部错误字符

func (*Errors) Unwrap

func (this *Errors) Unwrap() []error

func (*Errors) WithErrors

func (this *Errors) WithErrors(errs []error) *Errors

设置

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL