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() { func init() {
//addCommands(listCmd())
addCommands(deploymentCommands()) 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 { func list(c *cli.Context) error {
list, err := NewClient(c).ListDeployments() list, err := NewClient(c).ListDeployments()
if err != nil { if err != nil {

@ -31,11 +31,11 @@ func init() {
addCommands(cmds()...) 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 // This is set at app start-up time, based on the presence of the --debug
// flag. // flag.
var Debug bool var debug bool
func main() { func main() {
app := cli.NewApp() app := cli.NewApp()
@ -63,7 +63,7 @@ func main() {
}, },
} }
app.Before = func(c *cli.Context) error { app.Before = func(c *cli.Context) error {
Debug = c.GlobalBool("debug") debug = c.GlobalBool("debug")
return nil return nil
} }
app.Run(os.Args) 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 { func NewClient(c *cli.Context) *client.Client {
host := c.GlobalString("host") host := c.GlobalString("host")
timeout := c.GlobalInt("timeout") timeout := c.GlobalInt("timeout")
return client.NewClient(host).SetDebug(Debug).SetTimeout(timeout) return client.NewClient(host).SetDebug(debug).SetTimeout(timeout)
} }

Loading…
Cancel
Save