Documentation
¶
Overview ¶
Package catalog loads a resolver.Catalog from a filesystem of module.yaml manifests — the embedded modules/ tree in the compiled keel binary, or a test fixture in an fstest.MapFS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCatalog ¶
func LoadCatalog(fsys fs.FS) (resolver.MapCatalog, error)
LoadCatalog walks fsys for every module.yaml one level down and loads and validates each one, returning a resolver.MapCatalog keyed by module name.
fsys must be rooted at the directory that directly contains each module's subdirectory — e.g. an fs.Sub of keel's embedded catalog re-rooted at "modules", not the embedded root itself (which has "modules" as a single top-level entry, not the module directories themselves — go:embed keeps the embedded directory's own name as a path component, it does not flatten it away).