cmd

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandServe

func CommandServe() *cli.Command

func GetEnumValue

func GetEnumValue(c *cli.Context, flagName string) string

func GetGeneric

func GetGeneric[T any](c *cli.Context, name string) *T

Types

type EnumValue

type EnumValue struct {
	Enum    []string
	Default string
	// contains filtered or unexported fields
}

EnumValue is a flag.Value that can be used to restrict the values of a flag to a list of allowed values.

func (*EnumValue) Get

func (e *EnumValue) Get() string

func (*EnumValue) Set

func (e *EnumValue) Set(value string) error

func (EnumValue) String

func (e EnumValue) String() string

Jump to

Keyboard shortcuts

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