Help us shape the future of Go! Take the 2026 Go Developer Survey

app

package
v0.3.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package app contains shared orchestration used by the Astrix CLI and daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentDiff

func CurrentDiff(ctx context.Context, root string) (string, error)

CurrentDiff returns the staged and unstaged unified diff against HEAD.

func DetectLanguages

func DetectLanguages(dir string) []string

DetectLanguages scans one project directory for ecosystem markers and returns the detected languages in a fixed, deterministic priority order.

func Impact

func Impact(root, diff string) (astgraph.ImpactSet, []ingress.FileChange, error)

Impact computes the Go graph blast radius represented by a unified diff.

func InitProject

func InitProject(dir string, force bool, stdout io.Writer) error

InitProject generates a starter Astrixfile.ax in dir based on the languages and sandbox profile detected for the repository. An existing Astrixfile.ax is never overwritten unless force is set. The generated policy is validated with the real AxLang parser and semantic checker, then written in canonical formatter output, and a short confirmation is printed to stdout.

func PolicyGate

func PolicyGate(path string) (*policy.Gate, error)

PolicyGate loads and compiles an Astrixfile into an embedded OPA gate.

func ResolveProjectProfile

func ResolveProjectProfile(root, astrixfile string) (runner.ProjectProfile, error)

ResolveProjectProfile applies environment overrides, then .ax stage values, then manifest-based project defaults.

func RunTests

func RunTests(ctx context.Context, root string, impact astgraph.ImpactSet) error

RunTests runs either all Go tests or the packages containing the selected test nodes.

func ValidateAstrixfile

func ValidateAstrixfile(path string) (string, error)

ValidateAstrixfile parses, checks and compiles the configured policy module.

Types

This section is empty.

Jump to

Keyboard shortcuts

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