Skip to content

Commit

Permalink
These lines need to be moved so the NextToken makes it into the reque…
Browse files Browse the repository at this point in the history
…st properly
  • Loading branch information
ProTip committed Aug 8, 2014
1 parent 9ded52d commit 96e81c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ func (c *CloudWatch) ListMetrics(req *ListMetricsRequest) (result *ListMetricsRe
err = c.query("GET", "/", params, &result)
metrics := result.ListMetricsResult.Metrics
if result.ListMetricsResult.NextToken != "" {
params = aws.MakeParams("ListMetrics")
params["NextToken"] = result.ListMetricsResult.NextToken
for result.ListMetricsResult.NextToken != "" && err == nil {
params = aws.MakeParams("ListMetrics")
params["NextToken"] = result.ListMetricsResult.NextToken
result = new(ListMetricsResponse)
err = c.query("GET", "/", params, &result)
if err == nil {
Expand Down

0 comments on commit 96e81c2

Please sign in to comment.