fields

package
v0.7.14 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

Re-export common field types

Variables

View Source
var (
	WithHelp       = parameters.WithHelp
	WithShortFlag  = parameters.WithShortFlag
	WithDefault    = parameters.WithDefault
	WithChoices    = parameters.WithChoices
	WithRequired   = parameters.WithRequired
	WithIsArgument = parameters.WithIsArgument
)

Re-export common field definition options

Functions

This section is empty.

Types

type Definition

type Definition = parameters.ParameterDefinition

Definition is a type alias for parameters.ParameterDefinition. A Definition specifies a single field in a schema section (name, type, default, help, etc.).

func New

func New(name string, t Type, options ...Option) *Definition

New creates a new field definition with the given name and type. It wraps parameters.NewParameterDefinition.

type Definitions

type Definitions = parameters.ParameterDefinitions

Definitions is a type alias for parameters.ParameterDefinitions. Definitions is an ordered collection of field definitions.

func NewDefinitions

func NewDefinitions(options ...parameters.ParameterDefinitionsOption) *Definitions

NewDefinitions creates a new collection of field definitions. It wraps parameters.NewParameterDefinitions.

type Option

Option is a type alias for parameters.ParameterDefinitionOption. Option configures a Definition during construction.

type Type

Type is a type alias for parameters.ParameterType. Type represents the type of a field (string, int, bool, etc.).

Jump to

Keyboard shortcuts

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