From 9a92f99dce2a68ff279230246d67dbd76756c6d8 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Mon, 21 Mar 2016 17:09:09 -0600 Subject: [PATCH] fix(cli): remove 'helm list' Also, make the debug bool locally scoped. --- cmd/helm/deployment.go | 9 --------- cmd/helm/helm.go | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/cmd/helm/deployment.go b/cmd/helm/deployment.go index fca91e1fe..c4b7b7dee 100644 --- a/cmd/helm/deployment.go +++ b/cmd/helm/deployment.go @@ -25,7 +25,6 @@ import ( ) func init() { - //addCommands(listCmd()) addCommands(deploymentCommands()) } @@ -62,14 +61,6 @@ func deploymentCommands() cli.Command { } } -func listCmd() cli.Command { - return cli.Command{ - Name: "list", - Usage: "Lists the deployments in the cluster", - Action: func(c *cli.Context) { run(c, list) }, - } -} - func list(c *cli.Context) error { list, err := NewClient(c).ListDeployments() if err != nil { diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index cb41d1d2e..d1e44923a 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -31,11 +31,11 @@ func init() { addCommands(cmds()...) } -// Debug indicates whether the process is in debug mode. +// debug indicates whether the process is in debug mode. // // This is set at app start-up time, based on the presence of the --debug // flag. -var Debug bool +var debug bool func main() { app := cli.NewApp() @@ -63,7 +63,7 @@ func main() { }, } app.Before = func(c *cli.Context) error { - Debug = c.GlobalBool("debug") + debug = c.GlobalBool("debug") return nil } app.Run(os.Args) @@ -92,5 +92,5 @@ func run(c *cli.Context, f func(c *cli.Context) error) { func NewClient(c *cli.Context) *client.Client { host := c.GlobalString("host") timeout := c.GlobalInt("timeout") - return client.NewClient(host).SetDebug(Debug).SetTimeout(timeout) + return client.NewClient(host).SetDebug(debug).SetTimeout(timeout) }