diff --git a/client/v2/client.go b/client/v2/client.go index ecd68cf21a..3714cf7dd9 100644 --- a/client/v2/client.go +++ b/client/v2/client.go @@ -96,6 +96,9 @@ func (c *Client) Stats(name string, request *v2.RequestOptions) (map[string]v2.C "count": []string{strconv.Itoa(request.Count)}, "recursive": []string{strconv.FormatBool(request.Recursive)}, } + if request.MaxAge != nil { + data.Set("max_age", request.MaxAge.String()) + } u = fmt.Sprintf("%s?%s", u, data.Encode()) if err := c.httpGetJSONData(&ret, nil, u, "stats"); err != nil {