pizza

package
v0.0.0-...-ab62187 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: CC-BY-SA-4.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base string
const (
	Sugo  Base = "sugo"
	Cream Base = "cream"
)

type Option

type Option func(*Pizza)

func WithBase

func WithBase(base Base) Option

func WithSize

func WithSize(size Size) Option

func WithTopping

func WithTopping(topping Topping) Option

type Pizza

type Pizza struct {
	Base     Base
	Size     Size
	Toppings []Topping
}

func New

func New(options ...Option) (pizza *Pizza, err error)

type Size

type Size string
const (
	Regular Size = "32cm"
	Large   Size = "40cm"
)

type Topping

type Topping string
const (
	Prosciutto Topping = "prosciutto"
	Salami     Topping = "salami"
	Ham        Topping = "ham"
	Pineapple  Topping = "pineapple" // Don't even think about it
)

Jump to

Keyboard shortcuts

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