matrix

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CartesianProduct

func CartesianProduct(m map[string][]string) []map[string]string

Types

type Entry

type Entry map[string]string

func (Entry) BriefString

func (m Entry) BriefString() string

BriefString return all values concatenated with slash

func (Entry) Equals

func (m Entry) Equals(a map[string]string) bool

func (Entry) Match

func (m Entry) Match(a map[string]string) bool

func (Entry) MatchKV added in v0.4.0

func (m Entry) MatchKV(key, value string) bool

func (Entry) String

func (m Entry) String() string

type Filter added in v0.4.0

type Filter struct {
	// contains filtered or unexported fields
}

func NewFilter added in v0.4.0

func NewFilter(match map[string][]string) *Filter

func (*Filter) AddIgnore added in v0.4.0

func (f *Filter) AddIgnore(key, value string)

func (*Filter) AddMatch added in v0.4.0

func (f *Filter) AddMatch(key, value string)

func (*Filter) Clone added in v0.4.0

func (f *Filter) Clone() *Filter

type Spec

type Spec struct {
	rs.BaseField `yaml:"-"`

	Include []*specItem `yaml:"include,omitempty"`
	Exclude []*specItem `yaml:"exclude,omitempty"`

	// TODO: validate kernel and arch values to ensure
	// 		 tools get expected value set
	Kernel []string `yaml:"kernel,omitempty"`
	Arch   []string `yaml:"arch,omitempty"`

	// catch other matrix fields
	Custom map[string][]string `yaml:",omitempty" rs:"other"`
}

func (*Spec) GenerateEntries

func (mc *Spec) GenerateEntries(
	filter *Filter,
	hostKernel, hostArch string,
) []Entry

nolint:gocyclo

Jump to

Keyboard shortcuts

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