Support generic query params in sensuctl dump
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"io"
+ "net/url"
"os"
"reflect"
@@ -161,7 +162,8 @@ func execute(cli *cli.SensuCli) func(*cobra.Command, []string) error {
val := reflect.New(reflect.SliceOf(reflect.TypeOf(req)))
err = cli.Client.List(
- req.URIPath(), val.Interface(), &client.ListOptions{
+ fmt.Sprintf("%s?types=%s", req.URIPath(), url.QueryEscape(types.WrapResource(req).Type)),
+ val.Interface(), &client.ListOptions{
ChunkSize: ChunkSize,
}, nil)
if err != nil {
