Documentation
¶
Index ¶
Constants ¶
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 ¶
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 ¶
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.