module

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: GPL-3.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(ctx context.Context, mod *Module, targetDir string, dryRun bool) error

Execute runs all operations in a module sequentially.

func ResolveSource

func ResolveSource(source, parentDir string) (string, error)

ResolveSource resolves a module source to a local directory. Sources starting with "." or "/" are treated as local paths. Other sources are treated as git URLs and cloned to a temp directory.

Types

type Module

type Module struct {
	// Dir is the directory containing the module's loom.yaml.
	Dir string
	// Config is the parsed loom.yaml.
	Config *config.LoomFile
	// Params are the resolved parameters for this module.
	Params map[string]string
	// Logger is the structured logger.
	Logger *slog.Logger
}

Module represents a loaded and resolved loom module.

func Load

func Load(dir string, providedParams map[string]string, logger *slog.Logger) (*Module, error)

Load loads a module from a directory, merging provided params with defaults.

func (*Module) NewExecutionContext

func (m *Module) NewExecutionContext(targetDir string, dryRun bool) *action.ExecutionContext

NewExecutionContext creates an ExecutionContext for this module.

Jump to

Keyboard shortcuts

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