Go API Documentation

github.com/go-task/task/v3/experiments

No package summary is available.

Package

Files: 3. Third party imports: 1. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Constants

Vars

An internal list of all the initialized experiments used for iterating.

Types

Experiment

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.
AllowedValues

[]int

No comment on field.
Value

int

No comment on field.

InactiveError

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.

InvalidValueError

This type doesn't have documentation.

Field name Field type Comment
Name

string

No comment on field.
AllowedValues

[]int

No comment on field.
Value

int

No comment on field.

Functions

func List

func New

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

Uses: strconv.Atoi.

func Parse

Uses: taskrc.NewNode, taskrc.NewReader.

func Validate

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

func (Experiment) Active

func (Experiment) Enabled

Uses: slices.Contains.

func (Experiment) String

Uses: fmt.Sprintf.

func (Experiment) Valid

func (InactiveError) Error

Uses: fmt.Sprintf.

func (InvalidValueError) Error

Uses: fmt.Sprintf, slicesext.Convert, strconv.Itoa, strings.Join.

Private functions

func getEnv

References: fmt.Sprintf, os.Getenv.

func getFilePath

References: filepath.Join.

func readDotEnv

References: godotenv.Read, os.Setenv, strings.HasPrefix.


Tests

Files: 1. Third party imports: 1. Imports from organisation: 0. Tests: 1. Benchmarks: 0.

Test functions

TestNew

References: assert.Equal, ast.TaskRC, experiments.InactiveError, experiments.InvalidValueError, experiments.New, strconv.Itoa, testing.T.