builder

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.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 Builder

type Builder[T any] interface {
	Build() (T, error)
	AddModifier(...Modifier[T]) Builder[T]
}

type GenericBuilder

type GenericBuilder[T any] struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder[T any](data T) GenericBuilder[T]

func (*GenericBuilder[T]) AddModifier

func (b *GenericBuilder[T]) AddModifier(modifiers ...Modifier[T]) Builder[T]

func (GenericBuilder[T]) Build

func (b GenericBuilder[T]) Build() (T, error)

type Modifier

type Modifier[T any] interface {
	Enabled() bool
	Modify(*T) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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