command

package
v0.0.0-...-10ea56a Latest Latest
Warning

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

Go to latest
Published: May 29, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const COMMAND_HELP = "help"
View Source
const COMMAND_INIT = "init"
View Source
const COMMAND_RUN = "run"

Variables

This section is empty.

Functions

func Run

func Run(option *RunOption, imageName string, cmdArr []string) error

func Stop

func Stop(containerName string)

Types

type Command

type Command struct {
	// contains filtered or unexported fields
}

func (*Command) Execute

func (c *Command) Execute(args []string) error

Parse a subcommand's arguments, excluding the name of the command.

func (*Command) Help

func (c *Command) Help()

Print help information as name: usage\n flag...

func (*Command) Name

func (c *Command) Name() string

func (*Command) Usage

func (c *Command) Usage() string

type ICommand

type ICommand interface {
	Execute(args []string) error
	Name() string
	Usage() string
	Help()
}

func GetCommand

func GetCommand(cmdName string) ICommand

type RunOption

type RunOption struct {
	Tty           bool
	ContainerName string
	VolumeMapping string
	PortMappings  []string
	Envs          []string
}

Jump to

Keyboard shortcuts

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