Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadHTMLFileOrFail ¶
ReadHTMLFileOrFail attempts to read an HTML file from the testdata directory and then load it into a Document. The filename is formed by adding a .html suffix name and then appending it to the testdata directory to form the file path. Any failures are reported with t.Fatal().
Types ¶
type Scraper ¶
type Scraper struct { Author string Categories []string CookTime time.Duration Cuisine []string Description string ImageURL string Ingredients []string Instructions []string Language string Name string Nutrition recipe.Nutrition PrepTime time.Duration SuitableDiets []recipe.Diet TotalTime time.Duration Yields string }
Scraper is a struct that helps test packages to test values returned by a recipe.Scraper. Clients should fill in the values of the struct that they expect to be returned by the recipe.Scraper and then call Run(). Defined values will be validated for an exact match and zero values will be validated that nothing is returned.
Click to show internal directories.
Click to hide internal directories.