Simplify code

`gofmt -s` taught me that this is possible.

Signed-off-by: beorn7 <beorn@grafana.com>
This commit is contained in:
beorn7 2019-10-16 12:18:16 +02:00
parent 39fc195974
commit 679da921f7
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
desc: desc,
upperBounds: opts.Buckets,
labelPairs: makeLabelPairs(desc, labelValues),
counts: [2]*histogramCounts{&histogramCounts{}, &histogramCounts{}},
counts: [2]*histogramCounts{{}, {}},
}
for i, upperBound := range h.upperBounds {
if i < len(h.upperBounds)-1 {

View File

@ -208,7 +208,7 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
s := &noObjectivesSummary{
desc: desc,
labelPairs: makeLabelPairs(desc, labelValues),
counts: [2]*summaryCounts{&summaryCounts{}, &summaryCounts{}},
counts: [2]*summaryCounts{{}, {}},
}
s.init(s) // Init self-collection.
return s