cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version represents a version number in the form of major.minor.path
	Version string
	// Revision represents a commit hash when a binary is built
	Revision string
)

Functions

This section is empty.

Types

type CLI

type CLI struct {
	Context        *project.Context
	Config         *project.Config
	Args           []string
	Envs           []string
	RunInContainer bool

	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

CLI is an object holding states

func NewCLI

func NewCLI(ctx *project.Context, cfg *project.Config, args []string) *CLI

NewCLI creates a new CLI instance

func (*CLI) ExecDebug

func (c *CLI) ExecDebug() error

ExecDebug prints internal state objects

func (*CLI) ExecHelp

func (c *CLI) ExecHelp() error

ExecHelp shows help contents

func (*CLI) ExecSubHelp

func (c *CLI) ExecSubHelp() error

ExecSubHelp shows help contents for a custom sub-command

func (*CLI) ExecVersion

func (c *CLI) ExecVersion() error

ExecVersion prints version info

func (*CLI) Run

func (c *CLI) Run() error

Run executes commands

Jump to

Keyboard shortcuts

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