options

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool added in v1.3.0

type Bool struct {
	Value bool
}

type Choice

type Choice struct {
	Active  string
	Options []string
	UserSet bool // true once the user explicitly picked via 'options set'
}

type Options

type Options struct {
	Bools   map[string]*Bool
	Choices map[string]*Choice
}

Options is a single scope's option set. Names are unique within an Options instance but may collide across instances — each scope (root manifest and each include point that declares 'options:') owns its own Options, so two subgrmls can each have a 'debug' option without clashing.

func New

func New() *Options

func (*Options) Add added in v1.3.0

func (o *Options) Add(raw map[string]interface{}) error

Add merges raw option entries (decoded from YAML) into o. Returns an error if a name collides with an option already present in this scope.

func (*Options) Restore

func (o *Options) Restore(p *Options)

Jump to

Keyboard shortcuts

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