cli

package
v0.0.0-...-7cef974 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAndRun

func ParseAndRun(env Env) int

ParseAndRun parses the environment to create a run.Command and runs it. It returns the code that should be used for os.Exit.

func Run

func Run() int

Run parses command line arguments and runs command.

Types

type Env

type Env struct {
	Args   []string
	Stdout io.Writer
	Stderr io.Writer
}

Env encapsulates command environment.

type UI

type UI struct {
	TagsFile string
	Args     []string
}

UI represents the UI of the CLI.

func Parse

func Parse(env Env) (*UI, error)

Parse converts the program command line.

Jump to

Keyboard shortcuts

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