opts

package
v27.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamedSetOpts

type NamedSetOpts struct {
	SetOpts
	// contains filtered or unexported fields
}

NamedSetOpts is a SetOpts struct with a configuration name. This struct is useful to keep reference to the assigned field name in the internal configuration struct.

func NewNamedSetOpts

func NewNamedSetOpts(name string, values map[string]bool) *NamedSetOpts

NewNamedSetOpts creates a reference to a new NamedSetOpts struct.

func (*NamedSetOpts) Name

func (o *NamedSetOpts) Name() string

Name returns the name of the NamedSetOpts in the configuration.

type SetOpts

type SetOpts struct {
	// contains filtered or unexported fields
}

SetOpts holds a map of values and a validation function.

func NewSetOpts

func NewSetOpts(values map[string]bool) *SetOpts

NewSetOpts creates a new SetOpts with the specified set of values as a map of string to bool.

func (*SetOpts) GetAll

func (opts *SetOpts) GetAll() map[string]bool

GetAll returns the values of SetOpts as a map.

func (*SetOpts) Set

func (opts *SetOpts) Set(value string) error

Set validates if needed the input value and add it to the internal map, by splitting on '='.

func (*SetOpts) String

func (opts *SetOpts) String() string

func (*SetOpts) Type

func (opts *SetOpts) Type() string

Type returns a string name for this Option type

Jump to

Keyboard shortcuts

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