featureflags

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package featureflags provides typed feature flags backed by environment variables. Each flag is read from an environment variable named CACHEW_FF_<NAME> (uppercased) and JSON-decoded into the flag's type. If the variable is unset, the flag returns its default value. Supported types are int and bool.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

type Flag[T Type] struct {
	// contains filtered or unexported fields
}

func New

func New[T Type](name string, dflt T) Flag[T]

func (Flag[T]) Get

func (f Flag[T]) Get() (out T)

type Type

type Type interface{ int | bool }

Jump to

Keyboard shortcuts

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