Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
`gofmt -s` taught me that this is possible.

Signed-off-by: beorn7 <[email protected]>
  • Loading branch information
beorn7 committed Oct 16, 2019
1 parent 39fc195 commit 679da92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion prometheus/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion prometheus/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 679da92

Please sign in to comment.