xgo

package
v0.0.0-...-9f39f39 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerialUntilError

func SerialUntilError(fns ...func() error) func() error

创建一个迭代器

func SerialWhenError

func SerialWhenError(we WhenError) func(fn ...func() error) func() error

SerialWhenError ...

func SerialWithError

func SerialWithError(fns ...func() error) func() error

SerialWithError ...

func Try

func Try(fn func() error) (ret error)

Types

type WhenError

type WhenError int // 策略注入
var (
	// ReturnWhenError ...
	ReturnWhenError WhenError = 1

	// ContinueWhenError ...
	ContinueWhenError WhenError = 2

	// PanicWhenError ...
	PanicWhenError WhenError = 3

	// LastErrorWhenError ...
	LastErrorWhenError WhenError = 4
)

Jump to

Keyboard shortcuts

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