multierror

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 3 Imported by: 2

README

Build Status

multierror

-- import "go-multierror"

Usage

type MultiError
type MultiError struct {
}

MultiError implements error interface. An instance of MultiError has zero or more errors.

func NewMultiError
func NewMultiError() *MultiError

NewMultiError: returns a thread safe instance of multierror

func (*MultiError) Error
func (m *MultiError) Error() string

Error implements error interface.

func (*MultiError) HasError
func (m *MultiError) HasError() error

HasError checks if MultiError has any error.

func (*MultiError) Push
func (m *MultiError) Push(errString string)

Push adds an error to MultiError.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MultiError

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

MultiError implements error interface. An instance of MultiError has zero or more errors.

func NewMultiError

func NewMultiError() *MultiError

NewMultiError: returns a thread safe instance of multierror

func (*MultiError) Error

func (m *MultiError) Error() string

Error implements error interface.

func (*MultiError) HasError

func (m *MultiError) HasError() error

HasError checks if MultiError has any error.

func (*MultiError) Push

func (m *MultiError) Push(errString string)

Push adds an error to MultiError.

Jump to

Keyboard shortcuts

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