fix(cli): remove 'helm list'

Also, make the debug bool locally scoped.
pull/424/head
Matt Butcher 9 years ago
parent 68f253472f
commit 9a92f99dce

@ -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)
}

Loading…
Cancel
Save