builderpattern

package
v0.0.0-...-0a00fa3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lunch

type Lunch struct {
	Bread, Condiments, Dressing, Meat string
}

func Director

func Director(lb LunchBuilder) Lunch

type LunchBuilder

type LunchBuilder interface {
	Bread(bread string) LunchBuilder
	Condiments(condiments string) LunchBuilder
	Dressing(dressing string) LunchBuilder
	Meat(meat string) LunchBuilder
	Build() Lunch
}

type MyLunch

type MyLunch struct {
	Lunch
}

func (*MyLunch) Bread

func (ml *MyLunch) Bread(bread string) LunchBuilder

func (*MyLunch) Build

func (ml *MyLunch) Build() Lunch

func (*MyLunch) Condiments

func (ml *MyLunch) Condiments(condiments string) LunchBuilder

func (*MyLunch) Dressing

func (ml *MyLunch) Dressing(dressing string) LunchBuilder

func (*MyLunch) Meat

func (ml *MyLunch) Meat(meat string) LunchBuilder

Jump to

Keyboard shortcuts

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