matrix

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: Apache-2.0 Imports: 6 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 ParseMatrixFilter added in v0.6.0

func ParseMatrixFilter(arr []string) (ret 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) AsEntry added in v0.4.3

func (f *Filter) AsEntry() Entry

AsEntry converts f.match to a matrix Entry (used for task matrix) should only be used when you are sure the matrix filter is set for your task matrix execution

func (*Filter) Clone added in v0.4.0

func (f *Filter) Clone() Filter

func (*Filter) Empty added in v0.8.0

func (f *Filter) Empty() bool

func (*Filter) Equals added in v0.6.0

func (f *Filter) Equals(a *Filter) bool

type Spec

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

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

	// catch other matrix fields
	Data map[string]*Vector `yaml:",inline,omitempty"`
}

func (*Spec) AsFilter added in v0.8.0

func (s *Spec) AsFilter() (ret Filter)

func (*Spec) GenerateEntries

func (s *Spec) GenerateEntries(filter Filter) (ret []Entry)

func (*Spec) HasUserValue added in v0.8.0

func (s *Spec) HasUserValue() bool

type Vector added in v0.6.0

type Vector struct {
	rs.BaseField

	Vec []string `yaml:"__"`
}

func NewVector added in v0.6.0

func NewVector(elems ...string) *Vector

func (*Vector) Empty added in v0.8.0

func (v *Vector) Empty() bool

func (*Vector) Equals added in v0.6.0

func (v *Vector) Equals(a *Vector) bool

func (*Vector) MarshalYAML added in v0.6.0

func (v *Vector) MarshalYAML() (interface{}, error)

func (*Vector) ResolveFields added in v0.6.0

func (v *Vector) ResolveFields(rc rs.RenderingHandler, depth int, names ...string) error

func (*Vector) UnmarshalYAML added in v0.6.0

func (v *Vector) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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