cli

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	URL string

	AWSSigv4    *aws.Config
	Basic       *vars.KeyVal
	Bearer      string
	Color       printer.Color
	Data        io.Reader
	DryRun      bool
	Edit        bool
	Form        []vars.KeyVal
	Headers     []vars.KeyVal
	Help        bool
	HTTP        client.HTTPVersion
	Insecure    bool
	JSON        bool
	Method      string
	Multipart   []vars.KeyVal
	NoEncode    bool
	NoFormat    bool
	NoPager     bool
	Output      string
	Proxy       *url.URL
	QueryParams []vars.KeyVal
	Silent      bool
	Timeout     time.Duration
	Update      bool
	Verbose     int
	Version     bool
	XML         bool
}

func NewApp

func NewApp() *App

func Parse

func Parse() (*App, error)

func (*App) CLI

func (a *App) CLI() *CLI

func (*App) PrintHelp added in v0.4.1

func (a *App) PrintHelp(p *printer.Printer)

type Arguments

type Arguments struct {
	Name        string
	Description string
}

type CLI

type CLI struct {
	Description    string
	ArgFn          func(s string) error
	Args           []Arguments
	Flags          []Flag
	ExclusiveFlags [][]string
}

type Flag

type Flag struct {
	Short       string
	Long        string
	Args        string
	Description string
	Default     string
	Values      []string
	IsSet       func() bool
	Fn          func(value string) error
}

Jump to

Keyboard shortcuts

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