Help us shape the future of Go! Take the 2026 Go Developer Survey

cmdutil

package
v1.96.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewWhenEnv = func() *WhenEnv {
	return &WhenEnv{Env: envMap()}
}

Functions

func IsAllowedToExecute

func IsAllowedToExecute(when string) (bool, error)

func PickOption

func PickOption(args []string, opts []string) (string, []string)

Types

type EnvPatcher added in v1.77.0

type EnvPatcher struct{}

AST walker which replaces `$IDENTIFIER` with `Env.IDENTIFIER` member lookup expressions.

func (EnvPatcher) Visit added in v1.77.0

func (EnvPatcher) Visit(node *ast.Node)

type WhenEnv added in v1.77.0

type WhenEnv struct {
	Env map[string]string
}

The predefined variables of a when expression.

Jump to

Keyboard shortcuts

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