Documentation
¶
Overview ¶
Package yaml provides a read only storage implementation which sources its URLs from a YAML file. THe file is expected to be in the format:
--- - from: //x40/foo - to: //x40/bar
Where there is no scheme (assumed to be the default case), the "//" is required to clearly indicate this is a schemeless URL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Log = slog.Default()
Log is the logger for the library. Uses the default structured logger, but can be overridden to disable the output for this package.
Functions ¶
func New ¶
New generates the storer. It receives another storer which it will enrich with the content from the YAML, and an io.reader which is expected to supply the YAML (typically a file).
Returns an error in the case there is a failure to store the URL or to wholely fail the YAML parsing, but ignores single line failures (simply skipping the record)
Types ¶
This section is empty.