matrix

package
v1.216.0-test.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(entries []Entry) ([]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(entries []Entry, 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.

type Output

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

Output represents the GitHub Actions matrix strategy format.

Jump to

Keyboard shortcuts

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