features

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Registry = make(map[Flag]bool)

Registry stores the state of feature flags if they are set via config.

Functions

func Apply

func Apply(flags map[string]bool)

Apply updates the registry with the provided flags.

func Check

func Check(flag Flag) bool

Check checks if a feature flag is enabled, considering both Registry and environment variables.

func IsEnabled

func IsEnabled(flag Flag) bool

IsEnabled checks if a feature flag is enabled. It checks environment variables first (prefixed with AGENTIC_CONTROL_FEATURE_).

func Set

func Set(flag Flag, enabled bool)

Set sets the state of a feature flag.

Types

type Flag

type Flag string

Flag represents a feature flag.

const (
	// Example flag
	ExperimentalUI Flag = "EXPERIMENTAL_UI"
)

Jump to

Keyboard shortcuts

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