// Status prints the current status of components. func Status(targets []string, b backend.Backend) error { for _, target := range targets { if err := b.Status(target); err != nil { return err } } return nil }
// Status prints the current status of components. func Status(argv []string, b backend.Backend) error { usage := `Prints the current status of components. Usage: deisctl status [<target>...] [options] ` // parse command-line arguments args, err := docopt.Parse(usage, argv, true, "", false) if err != nil { return err } targets := args["<target>"].([]string) for _, target := range targets { if err := b.Status(target); err != nil { return err } } return nil }