cli

package
v0.0.0-...-a021e2d Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2017 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package cli provides access to commuter over the command line via Stdin, Stdout, and command line arguments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgParser

type ArgParser struct {
	Args []string
}

ArgParser parses input arguments from the command line.

func NewArgParser

func NewArgParser(args []string) *ArgParser

NewArgParser initializes and returns an ArgParser.

func (*ArgParser) Parse

Parse attempts to determine which command is being executed, parse its flags, and return it.

type Stdin

type Stdin struct {
	*bufio.Scanner
}

Stdin provides an input mechanism for the user via the command line.

func NewStdin

func NewStdin() Stdin

NewStdin initializes and returns a Stdin.

type Stdout

type Stdout struct {
	io.Writer
}

Stdout provides an output mechanism to notify the user via stdout.

func NewStdout

func NewStdout() Stdout

NewStdout initializes and returns a new Stdout.

func (Stdout) Indicate

func (s Stdout) Indicate(msg string, args ...interface{})

Indicate prints an indication to the user.

Jump to

Keyboard shortcuts

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