go_mode_flag

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flag

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

Flag is a custom flag type

func NewFlag

func NewFlag(value string, allowed []string) *Flag

NewFlag creates a new Flag

func (*Flag) Allowed

func (f *Flag) Allowed() []string

Allowed returns the allowed values

func (*Flag) Set

func (f *Flag) Set(value string) error

Set validates and sets the flag value

func (*Flag) String

func (f *Flag) String() string

String returns the string representation of the flag value

func (*Flag) Value

func (f *Flag) Value() string

Value returns the flag value

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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