experiment

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package experiment provides support for experimental features.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enabled

func Enabled(name string) bool

func Fprint

func Fprint(w io.Writer)

Fprint writes a list of all available experiments to w.

Types

type Experiment

type Experiment struct {
	Name        string // The name of the experiment used in -x flag
	Description string // A short description of what the experiment does
	Enabled     bool   // Whether the experiment is enabled
}

Experiment represents an experimental feature. Experiments are global.

func (Experiment) String

func (e Experiment) String() string

type Flag

type Flag struct {
	Value string
	// contains filtered or unexported fields
}

Flag is a custom flag type that allows for comma-separated values and can be used multiple times.

func (*Flag) Get

func (f *Flag) Get() any

Get returns the flag values.

func (*Flag) Process

func (f *Flag) Process() error

Process handles all flag values, enabling the appropriate experiments.

func (*Flag) Set

func (f *Flag) Set(value string) error

Set adds a value to the flag.

func (*Flag) String

func (f *Flag) String() string

String returns the string representation of the flag value.

Jump to

Keyboard shortcuts

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