formula

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formula

type Formula struct {

	// NOTE(MeteorsLiu): these signatures MUST match with
	// 	the method declaration of ModuleF in formula/classfile.go
	ModPath   string
	FromVer   string
	OnRequire func(proj *formula.Project, deps *formula.ModuleDeps)
	OnBuild   func(ctx *formula.Context, proj *formula.Project, out *formula.BuildResult)
	// contains filtered or unexported fields
}

Formula represents a loaded LLAR formula file with its metadata and callbacks. It contains module information and build/dependency handling functions.

func LoadFS

func LoadFS(fsys fs.ReadFileFS, path string) (*Formula, error)

LoadFS loads a formula from a filesystem interface. This allows loading formulas from remote repositories or mock filesystems. The path should be relative to the filesystem root.

func (*Formula) SetStderr

func (f *Formula) SetStderr(w io.Writer)

SetStderr sets the stderr writer for the formula's gsh.App.

func (*Formula) SetStdout

func (f *Formula) SetStdout(w io.Writer)

SetStdout sets the stdout writer for the formula's gsh.App. This is used to control build output verbosity.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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