catalog

package
v0.0.0-...-99f4f86 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 6 Imported by: 0

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).

Types

type LoadError

type LoadError struct {
	Errors []error
}

LoadError aggregates every module.yaml that failed to load or validate, rather than stopping at the first bad manifest — the same posture as every other aggregation point in this codebase (manifest.ValidationError, renderer.RenderError).

func (*LoadError) Error

func (e *LoadError) Error() string

func (*LoadError) Unwrap

func (e *LoadError) Unwrap() []error

Jump to

Keyboard shortcuts

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