From 679da921f79f716fd577c9e83129446248055557 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Wed, 16 Oct 2019 12:18:16 +0200 Subject: [PATCH] Simplify code `gofmt -s` taught me that this is possible. Signed-off-by: beorn7 --- prometheus/histogram.go | 2 +- prometheus/summary.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prometheus/histogram.go b/prometheus/histogram.go index d7ea67b..fd6ab7b 100644 --- a/prometheus/histogram.go +++ b/prometheus/histogram.go @@ -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 { diff --git a/prometheus/summary.go b/prometheus/summary.go index c970fde..ae42e76 100644 --- a/prometheus/summary.go +++ b/prometheus/summary.go @@ -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