eithererr

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecAllFunc added in v0.5.6

func ExecAllFunc(
	functions ...func() *errorwrapper.Wrapper,
) *[]*errorwrapper.Wrapper

ExecAllFunc runs all and returns the final error

func ExecAnyFunc added in v0.6.5

func ExecAnyFunc(
	functions ...func() *errorwrapper.Wrapper,
) *errorwrapper.Wrapper

ExecAnyFunc either one of the function returns error first will block the other to execute and returns the first one

func MultiPtr

func MultiPtr(
	defaultType errtype.Variation,
	wrappers ...*errorwrapper.Wrapper,
) *errorwrapper.Wrapper

MultiPtr Return which ever wrapper is no nil or empty at last returns New(defaultType)

func Or

func Or(
	isCondition bool,
	trueWrapper,
	falseWrapper errorwrapper.Wrapper,
) errorwrapper.Wrapper

func OrCollectionPtr added in v0.3.6

func OrCollectionPtr(
	isCondition bool,
	trueWrappers,
	falseWrappers *errwrappers.Collection,
) *errwrappers.Collection

func OrEmpty added in v0.3.6

func OrEmpty(
	wrappers ...errorwrapper.Wrapper,
) *errorwrapper.Wrapper

OrEmpty Return which ever wrapper is no nil or empty and if all nil or empty then Return null based

func OrEmptyCollectionPtr added in v0.3.6

func OrEmptyCollectionPtr(
	isCondition bool,
	trueWrappers *errwrappers.Collection,
) *errwrappers.Collection

func OrEmptyPtr added in v0.3.6

func OrEmptyPtr(
	isCondition bool,
	trueWrapper *errorwrapper.Wrapper,
) *errorwrapper.Wrapper

func OrMulti

func OrMulti(
	defaultType errtype.Variation,
	wrappers ...errorwrapper.Wrapper,
) errorwrapper.Wrapper

OrMulti Return which ever wrapper is no nil or empty at last returns New(defaultType)

func OrNull

func OrNull(
	wrappers ...errorwrapper.Wrapper,
) *errorwrapper.Wrapper

OrNull Return which first wrapper which has error

Return null based

func OrNullPtr

func OrNullPtr(
	wrappers ...*errorwrapper.Wrapper,
) *errorwrapper.Wrapper

OrNullPtr Return which ever wrapper is no nil or empty and if all nil or empty then Return null based

func OrPtr

func OrPtr(
	isCondition bool,
	trueWrapper,
	falseWrapper *errorwrapper.Wrapper,
) *errorwrapper.Wrapper

func WrapperOrFunc added in v0.6.5

func WrapperOrFunc(
	wrapper *errorwrapper.Wrapper,
	errWrapperFunc func() *errorwrapper.Wrapper,
) *errorwrapper.Wrapper

func WrappersOrEmptyPtr added in v0.6.5

func WrappersOrEmptyPtr(
	wrappers ...*errorwrapper.Wrapper,
) *errorwrapper.Wrapper

OrWrappersEmptyPtr Return which ever wrapper is no nil or empty and if all nil or empty then Return empty

Types

This section is empty.

Jump to

Keyboard shortcuts

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