flags

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(f *Set, args []string) error

type Help

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

func (*Help) Add

func (h *Help) Add(line string)

type HelpCB

type HelpCB func(h *Help)

type Set

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

func New

func New(f *flag.FlagSet, output io.Writer) *Set

func NewRoot

func NewRoot(output io.Writer) *Set

func (*Set) Add

func (f *Set) Add(name string) *Set

func (*Set) Args

func (f *Set) Args() []string

func (*Set) Define

func (f *Set) Define(cb func(*flag.FlagSet) HelpCB) *Set

func (*Set) Do

func (f *Set) Do() error

func (*Set) Handler

func (f *Set) Handler(h Handler) *Set

func (*Set) Parse

func (f *Set) Parse(args []string) (sub *Set, trail []string)

func (*Set) ParseCommandline

func (f *Set) ParseCommandline() (sub *Set, trail []string)

func (*Set) Usage

func (f *Set) Usage(ex int)

Jump to

Keyboard shortcuts

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