command

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultInitName is the default name we use when
	// initializing the example file
	DefaultInitName = "example.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagSetFlags

type FlagSetFlags uint

FlagSetFlags is an enum to define what flags are present in the default FlagSet returned by Meta.FlagSet.

const (
	FlagSetNone    FlagSetFlags = 0
	FlagSetClient  FlagSetFlags = 1 << iota
	FlagSetDefault              = FlagSetClient
)

type InitCommand

type InitCommand struct {
	Meta
}

func (*InitCommand) Help

func (c *InitCommand) Help() string

Help provides the help information for the init command.

func (*InitCommand) Run

func (c *InitCommand) Run(args []string) int

Run triggers the init command to write the example.json file out to the current directory.

func (*InitCommand) Synopsis

func (c *InitCommand) Synopsis() string

Synopsis is provides a brief summary of the init command.

type Meta

type Meta struct {
	UI cli.Ui
}

Meta contains the meta-options and functionality that Replicator commands can inherit.

func (*Meta) FlagSet

func (m *Meta) FlagSet(n string, fs FlagSetFlags) *flag.FlagSet

FlagSet returns a FlagSet with the common flags that every command implements. The exact behavior of FlagSet can be configured using the flags as the second parameter, for example to disable server settings on the commands that don't talk to a server.

type VersionCommand

type VersionCommand struct {
	Revision          string
	Version           string
	VersionPrerelease string
	UI                cli.Ui
}

VersionCommand is a Command implementation that prints the version.

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help provides the help information for the version command.

func (*VersionCommand) Run

func (c *VersionCommand) Run(_ []string) int

Run executes the version command.

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis is provides a brief summary of the version command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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