merror

package module
v0.0.0-...-71c95e4 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2014 License: MIT Imports: 1 Imported by: 0

README

merror

-- import "github.com/doloopwhile/go-merror"

Package merror provide MultipleError which help to collecting together multiple errors

Usage

type MultipleError
type MultipleError struct {
	Errors []error
}

MultipleError is collection of errors

func Of
func Of(errs []error) *MultipleError

Of is a factory of MultipleError. If errs contains non-nil errors, returns a MultipleError of the errors. If errs contains nil's only or errs is nil, returns nil

func (*MultipleError) Error
func (m *MultipleError) Error() string

Error returns sub error messages they have been joined with semi-colons.

License

MIT License. See LICENSE file.

Contribution

I am looking for you pull request.

Author

doloopwhile

Documentation

Overview

Package merror provide MultipleError which help to collecting together multiple errors

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Of

func Of(errs []error) error

Of is a factory of MultipleError. If errs contains non-nil errors, returns a MultipleError of the errors. If errs contains nil's only or errs is nil, returns nil

Types

type MultipleError

type MultipleError struct {
	Errors []error
}

MultipleError is collection of errors

func (*MultipleError) Error

func (m *MultipleError) Error() string

Error returns sub error messages they have been joined with semi-colons.

Jump to

Keyboard shortcuts

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