cli

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	URL *url.URL

	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
	IsSecret    bool
	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