matrix

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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 Marshal

func Marshal[T any](entries []T) ([]byte, error)

Marshal serializes matrix entries to compact JSON. Nil entries are normalized to an empty slice to produce {"include":[]} instead of {"include":null}.

func WriteOutput

func WriteOutput[T any](entries []T, outputFile string) error

WriteOutput writes the matrix output to stdout or a file. If outputFile is specified (for $GITHUB_OUTPUT), writes in key=value format. Otherwise, writes JSON to stdout.

Types

type Entry

type Entry struct {
	Stack         string `json:"stack"`
	Component     string `json:"component"`
	ComponentPath string `json:"component_path"`
	ComponentType string `json:"component_type"`
}

Entry represents a single entry in the matrix include array for stack/component-shaped matrices (`atmos describe affected`/`atmos list instances --format=matrix`).

type Output

type Output[T any] struct {
	Include []T `json:"include"`
}

Output represents the GitHub Actions matrix strategy format. Generic over the entry type so any caller with its own include-row shape (e.g. stack/component below, or a CI job's own shard/packages row) can reuse the same JSON/$GITHUB_OUTPUT plumbing instead of reimplementing it.

Jump to

Keyboard shortcuts

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