cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgParser

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

An ArgParser contains the definitions of flags, arguments and commands for an application

func RegisterCommands

func RegisterCommands(version string) *ArgParser

RegisterCommands creates the app's standard ArgParser

func (*ArgParser) Parse

func (p *ArgParser) Parse(args []string) (Command, error)

Parse converts command line arguments into a Command

type Command

type Command func(stdout, stderr io.Writer) error

Command is an abstraction for a function that produces human readable output when run

Jump to

Keyboard shortcuts

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