Skip to content

Commit

Permalink
Merge pull request goamz#49 from ianneub/master
Browse files Browse the repository at this point in the history
Allow 0 values to be entered for CloudWatch PutMetricDataNamespace
  • Loading branch information
Boyan Dimitrov committed Dec 2, 2014
2 parents 600a214 + 3e27f5f commit 3998548
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cloudwatch/cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,7 @@ func (c *CloudWatch) PutMetricDataNamespace(metrics []MetricDatum, namespace str
if metric.Unit != "" {
params[prefix+".Unit"] = metric.Unit
}
if metric.Value != 0 {
params[prefix+".Value"] = strconv.FormatFloat(metric.Value, 'E', 10, 64)
}
params[prefix+".Value"] = strconv.FormatFloat(metric.Value, 'E', 10, 64)
if !metric.Timestamp.IsZero() {
params[prefix+".Timestamp"] = metric.Timestamp.UTC().Format(time.RFC3339)
}
Expand Down

0 comments on commit 3998548

Please sign in to comment.