parser

package
v0.0.0-...-b6a30c4 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidRecipe = errors.New("invalid recipe")
	ErrMissingTitle  = fmt.Errorf("%w: missing title", ErrInvalidRecipe)
)

Functions

This section is empty.

Types

type RecipeFrontmatter

type RecipeFrontmatter struct {
	Servings uint
	Tags     []string
	Source   string
}

type RecipeMetadata

type RecipeMetadata struct {
	*RecipeFrontmatter
	Title string
}

type RecipeParser

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

func NewParser

func NewParser() *RecipeParser

func (*RecipeParser) ParseRecipe

func (p *RecipeParser) ParseRecipe(content []byte) (*RecipeMetadata, error)

Jump to

Keyboard shortcuts

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