If a document contains only whitespace and we are not able to decode it
into one of the supported schemas, we ignore it and continue. We want to
avoid skipping a type that does not have a registered schema so that we
do not silently ignore errors when package building, but we consider it
safe to assume that a YAML document with no content is safe to skip.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
The FsReadCloser claimed to implictly skip empty files, but this was
only true when the final file to be read was empty. This updates to add
a SkipEmpty option that will filter out empty files before even
attempting to read file contents.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
DefaultParser is not descriptive of the Parser implementation's purpose.
PackageParser indicates the this parser is meant for parsing packages.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Adds a package parser and a variety of backends that reads from a YAML
stream, accepting objects that are either part of the meta or object
runtime.Scheme and returning them as a Package.
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>