client.ContainerWait(): don't send empty "condition" query parameter
The client would always send a value, even if no `condition` was set;
Calling POST /v1.41/containers/foo/wait?condition=
This patch changes the client to not send the parameter if it's empty (and the
API default value should be used).
@@ -33,7 +33,9 @@ func (cli *Client) ContainerWait(ctx context.Context, containerID string, condit
errC := make(chan error, 1)
query := url.Values{}
+ if condition != "" {
query.Set("condition", string(condition))
+ }
resp, err := cli.post(ctx, "/containers/"+containerID+"/wait", query, nil, nil)
if err != nil {
