Skip to content

Commit

Permalink
Merge pull request #203 from ProTip/master
Browse files Browse the repository at this point in the history
These lines need to be moved so the NextToken makes it into the request ...
  • Loading branch information
moorage committed Aug 24, 2014
2 parents 9ded52d + 96e81c2 commit 63104b5
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 63104b5

Please sign in to comment.