cli

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandName

func CommandName(args Args) string

func GetBool

func GetBool(args Args, name string) bool

func GetInt

func GetInt(args Args, name string) (int, error)

func GetString

func GetString(args Args, name string) string

func IsJSON

func IsJSON(args Args) bool

func RunApp

func RunApp(app App) error

Types

type App

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

func Action

func Action(app App, handler func(Args)) App

func AddFlag

func AddFlag(app App, name string, description string, defaultValue string) App

func Arg

func Arg(app App, name string, description string) App

func Command

func Command(app App, name string, desc string) App

func CommandAction

func CommandAction(app App, cmd string, handler func(Args)) App

func CommandFlag

func CommandFlag(app App, cmd string, name string, desc string, defaultValue string) App

func Description

func Description(app App, desc string) App

func GlobalFlag

func GlobalFlag(app App, name string, desc string, defaultValue string) App

func New

func New(name string) App

type ArgDef

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

type Args

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

func NewArgs

func NewArgs(values map[string]string) Args

type FlagDef

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

type SubcommandDef

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

Jump to

Keyboard shortcuts

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