Do not export symbols from the main package

main packages are not importable; see the discussion at https://github.com/golang/go/issues/4210

Signed-off-by: Burcu Dogan <jbd@google.com>
This commit is contained in:
Burcu Dogan 2016-01-23 14:40:55 -08:00
parent d7c5849537
commit 40086bd92b
4 changed files with 23 additions and 23 deletions

View file

@ -10,17 +10,17 @@ import (
netcontext "golang.org/x/net/context"
)
var CheckpointCommand = cli.Command{
var checkpointCommand = cli.Command{
Name: "checkpoints",
Usage: "list all checkpoints",
Subcommands: []cli.Command{
ListCheckpointCommand,
CreateCheckpointCommand,
listCheckpointCommand,
createCheckpointCommand,
},
Action: listCheckpoints,
}
var ListCheckpointCommand = cli.Command{
var listCheckpointCommand = cli.Command{
Name: "list",
Usage: "list all checkpoints for a container",
Action: listCheckpoints,
@ -50,7 +50,7 @@ func listCheckpoints(context *cli.Context) {
}
}
var CreateCheckpointCommand = cli.Command{
var createCheckpointCommand = cli.Command{
Name: "create",
Usage: "create a new checkpoint for the container",
Flags: []cli.Flag{
@ -94,7 +94,7 @@ var CreateCheckpointCommand = cli.Command{
},
}
var DeleteCheckpointCommand = cli.Command{
var deleteCheckpointCommand = cli.Command{
Name: "delete",
Usage: "delete a container's checkpoint",
Action: func(context *cli.Context) {

View file

@ -36,20 +36,20 @@ func getClient(ctx *cli.Context) types.APIClient {
return types.NewAPIClient(conn)
}
var ContainersCommand = cli.Command{
var containersCommand = cli.Command{
Name: "containers",
Usage: "interact with running containers",
Subcommands: []cli.Command{
ExecCommand,
KillCommand,
ListCommand,
StartCommand,
StatsCommand,
execCommand,
killCommand,
listCommand,
startCommand,
statsCommand,
},
Action: listContainers,
}
var ListCommand = cli.Command{
var listCommand = cli.Command{
Name: "list",
Usage: "list all running containers",
Action: listContainers,
@ -71,7 +71,7 @@ func listContainers(context *cli.Context) {
}
}
var StartCommand = cli.Command{
var startCommand = cli.Command{
Name: "start",
Usage: "start a container",
Flags: []cli.Flag{
@ -239,7 +239,7 @@ func attachStdio(stdins, stdout, stderr *string) error {
return nil
}
var KillCommand = cli.Command{
var killCommand = cli.Command{
Name: "kill",
Usage: "send a signal to a container or it's processes",
Flags: []cli.Flag{
@ -269,7 +269,7 @@ var KillCommand = cli.Command{
},
}
var ExecCommand = cli.Command{
var execCommand = cli.Command{
Name: "exec",
Usage: "exec another process in an existing container",
Flags: []cli.Flag{
@ -356,7 +356,7 @@ var ExecCommand = cli.Command{
},
}
var StatsCommand = cli.Command{
var statsCommand = cli.Command{
Name: "stats",
Usage: "get stats for running container",
Action: func(context *cli.Context) {

View file

@ -10,7 +10,7 @@ import (
netcontext "golang.org/x/net/context"
)
var EventsCommand = cli.Command{
var eventsCommand = cli.Command{
Name: "events",
Usage: "receive events from the containerd daemon",
Action: func(context *cli.Context) {

View file

@ -9,13 +9,13 @@ import (
"github.com/docker/containerd"
)
const Usage = `High performance container daemon cli`
const usage = `High performance container daemon cli`
func main() {
app := cli.NewApp()
app.Name = "ctr"
app.Version = containerd.Version
app.Usage = Usage
app.Usage = usage
app.Authors = []cli.Author{
{
Name: "@crosbymichael",
@ -34,9 +34,9 @@ func main() {
},
}
app.Commands = []cli.Command{
CheckpointCommand,
ContainersCommand,
EventsCommand,
checkpointCommand,
containersCommand,
eventsCommand,
}
app.Before = func(context *cli.Context) error {
if context.GlobalBool("debug") {