experiments

package
v3.43.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse added in v3.43.0

func Parse(dir string)

func Validate added in v3.42.0

func Validate() error

Validate checks if any experiments have been enabled while being inactive. If one is found, the function returns an error.

Types

type Experiment added in v3.34.0

type Experiment struct {
	Name          string // The name of the experiment.
	AllowedValues []int  // The values that can enable this experiment.
	Value         int    // The version of the experiment that is enabled.
}
var (
	GentleForce     Experiment
	RemoteTaskfiles Experiment
	EnvPrecedence   Experiment
)

Active experiments.

var (
	AnyVariables Experiment
	MapVariables Experiment
)

Inactive experiments. These are experiments that cannot be enabled, but are preserved for error handling.

func List

func List() []Experiment

func New added in v3.34.0

func New(xName string, config *ast.TaskRC, allowedValues ...int) Experiment

New creates a new experiment with the given name and sets the values that can enable it.

func (Experiment) Active added in v3.42.0

func (x Experiment) Active() bool

func (Experiment) Enabled added in v3.34.0

func (x Experiment) Enabled() bool

func (Experiment) String added in v3.34.0

func (x Experiment) String() string

func (Experiment) Valid added in v3.42.0

func (x Experiment) Valid() error

type InactiveError added in v3.42.0

type InactiveError struct {
	Name string
}

func (InactiveError) Error added in v3.42.0

func (err InactiveError) Error() string

type InvalidValueError added in v3.42.0

type InvalidValueError struct {
	Name          string
	AllowedValues []int
	Value         int
}

func (InvalidValueError) Error added in v3.42.0

func (err InvalidValueError) Error() string

Jump to

Keyboard shortcuts

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