initializer

package
v0.0.0-...-dddda54 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Initializer

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

Initializer is a chainable initializer. Init/InitOnSystemBus/InitOnSystemBus will accept a initializer, and then pass the successful return value to the next initializer. If error occurs, the rest initializers won't be executed any more. GetError is used to access the error.

func NewInitializer

func NewInitializer() *Initializer

NewInitializer creates a new Initializer.

func (*Initializer) GetError

func (i *Initializer) GetError() error

GetError returns the first error of initializers.

func (*Initializer) Init

func (i *Initializer) Init(fn func(interface{}) (interface{}, error)) *Initializer

Init accepts a initializer function, and pass the successful return value to next initializer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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