Merge pull request #29 from nspcc-dev/fix-bug-with-decoding-metrics

Fix bug with DecodeMetrics (empty metrics returns)
This commit is contained in:
Evgeniy Kulikov 2019-12-17 18:00:28 +03:00 committed by GitHub
commit 41167eb040
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,7 @@ func DecodeMetrics(r *MetricsResponse) ([]*MetricFamily, error) {
if err := proto.Unmarshal(r.Metrics[i], mf); err != nil {
return nil, err
}
metrics = append(metrics, mf)
}
return metrics, nil