Skip to content

Commit

Permalink
Do not export symbols from the main package
Browse files Browse the repository at this point in the history
main packages are not importable; see the discussion at golang/go#4210

Signed-off-by: Burcu Dogan <jbd@google.com>
  • Loading branch information
rakyll committed Jan 24, 2016
1 parent d7c5849 commit 40086bd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions ctr/checkpoint.go
Expand Up @@ -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,
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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) {
Expand Down
22 changes: 11 additions & 11 deletions ctr/container.go
Expand Up @@ -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,
Expand All @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ctr/events.go
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions ctr/main.go
Expand Up @@ -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",
Expand All @@ -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") {
Expand Down

0 comments on commit 40086bd

Please sign in to comment.