cmd

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2014 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exec = &Command{
	UsageLine: "exec [options] command [argument...]",
	Short:     "execute a command with the given environment",
}
View Source
var Key = &Command{
	UsageLine: "key filename",
	Short:     "create a key saved at the given filename",
}
View Source
var Server = &Command{
	UsageLine: "server [options]",
	Short:     "start a stocker server",
}
View Source
var Set = &Command{
	UsageLine: "set [options] variable [variable...]",
	Short:     "set the values of the given variables",
}

Functions

This section is empty.

Types

type Command

type Command struct {
	// Run runs the command.
	// The args are the arguments after the command name.
	Run func(cmd *Command, args []string)

	// UsageLine is the one-line usage message.
	// The first word in the line is taken to be the command name.
	UsageLine string

	// Short is the short description shown in the 'stocker help' output.
	Short, Long string

	// Flag is a set of flags specific to this command.
	Flag flag.FlagSet
}

This is a modified verson of the Comand type from the Go source code. http://golang.org/src/cmd/go/main.go

func (*Command) Fatal added in v0.5.0

func (c *Command) Fatal(message string)

func (*Command) Name

func (c *Command) Name() string

func (*Command) Usage

func (c *Command) Usage(code int)

type StringAcumulator

type StringAcumulator []string

func (*StringAcumulator) Set

func (s *StringAcumulator) Set(value string) error

func (*StringAcumulator) String

func (s *StringAcumulator) String() string

Jump to

Keyboard shortcuts

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