mode

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mode resolves the product mode before a Cobra tree is constructed.

Index

Constants

View Source
const FeaturesEnv = "CLI_FEATURES"

Variables

This section is empty.

Functions

func ProcessArgs

func ProcessArgs() []string

ProcessArgs returns the original process arguments captured before dependent command packages inspect them during package initialization.

func Resolve

func Resolve(args []string, lookupEnv func(string) (string, bool)) (Mode, FeatureSet, []string, error)

Resolve merges Alpha defaults, the environment, then command line features. It returns the arguments that Cobra should receive.

Types

type FeatureSet

type FeatureSet map[string]bool

func (FeatureSet) String

func (f FeatureSet) String() string

type Mode

type Mode string
const (
	Legacy Mode = "legacy"
	Next   Mode = "next"
)

Jump to

Keyboard shortcuts

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