cmd

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main()

func NewPrinter

func NewPrinter(format string, w io.Writer) func(any)

NewPrinter returns a function that prints in the chose format to writer.

Types

type EnumFlagValue

type EnumFlagValue struct {
	Allowed []string
	Value   string
}

EnumFlagValue is a flag value that validates its value is one of a set of allowed values.

func EnumFlag

func EnumFlag(allowed ...string) *EnumFlagValue

EnumFlag returns an enum flag value with the allowed strings. First one is the default.

func (*EnumFlagValue) Set

func (f *EnumFlagValue) Set(s string) error

func (*EnumFlagValue) String

func (f *EnumFlagValue) String() string

func (*EnumFlagValue) Type

func (f *EnumFlagValue) Type() string

Jump to

Keyboard shortcuts

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