Skip to content

Commit e87a0ad

Browse files
committed
Cleanup uneeded diff and add a comment to orderedLabels
Signed-off-by: Kyle Eckhart <[email protected]>
1 parent d0e9c61 commit e87a0ad

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

prometheus/desc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ type Desc struct {
5151
// constLabelPairs contains the sorted DTO label pairs based on the constant labels
5252
// and variable labels
5353
constLabelPairs []*dto.LabelPair
54-
54+
// orderedLabels contains the sorted labels with necessary fields to construct the
55+
// final label pairs when needed.
5556
orderedLabels []labelMapping
5657
// id is a hash of the values of the ConstLabels and fqName. This
5758
// must be unique among all registered descriptors and can therefore be

prometheus/histogram.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,6 @@ func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogr
542542
panic(errBucketLabelNotAllowed)
543543
}
544544
}
545-
546545
for _, lp := range desc.constLabelPairs {
547546
if lp.GetName() == bucketLabel {
548547
panic(errBucketLabelNotAllowed)

prometheus/summary.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary {
201201
panic(errQuantileLabelNotAllowed)
202202
}
203203
}
204-
205204
for _, lp := range desc.constLabelPairs {
206205
if lp.GetName() == quantileLabel {
207206
panic(errQuantileLabelNotAllowed)

0 commit comments

Comments
 (0)