Commit 9a92f99d authored by Matt Butcher's avatar Matt Butcher

fix(cli): remove 'helm list'

Also, make the debug bool locally scoped.
parent 68f25347
......@@ -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 {
......
......@@ -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)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment