func queryHealth(c *cli.Context) { rsp, err := command.QueryHealth(c, c.Args()) if err != nil { fmt.Println(err) return } fmt.Println(string(rsp)) }
// Health returns the health of a service func Health(ctx *cli.Context) Command { usage := "health [service]" desc := "Returns health of a service" return NewCommand("health", usage, desc, func(args ...string) ([]byte, error) { if len(args) < 2 { return []byte("health of what?"), nil } rsp, err := command.QueryHealth(ctx, args[1:]) if err != nil { return nil, err } return rsp, nil }) }