Skip to content

Commit df2dcf4

Browse files
committed
fix examples_test output and various opts comments
1 parent 6d75da8 commit df2dcf4

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

prometheus/desc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type Desc struct {
4747
fqName string
4848
// help provides some helpful information about this metric.
4949
help string
50-
// unit provides the unit of this metric
50+
// unit provides the unit of this metric.
5151
unit string
5252
// constLabelPairs contains precalculated DTO label pairs based on
5353
// the constant labels.

prometheus/examples_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ func ExampleRegister() {
308308

309309
// Output:
310310
// taskCounter registered.
311-
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
311+
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", unit: "", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
312312
// taskCounter unregistered.
313-
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
313+
// taskCounterVec not registered: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "worker_pool_completed_tasks_total", help: "Total number of tasks completed.", unit: "", constLabels: {}, variableLabels: {worker_id}} has different label names or a different help string
314314
// taskCounterVec registered.
315315
// Worker initialization failed: inconsistent label cardinality: expected 1 label values but got 2 in []string{"42", "spurious arg"}
316316
// notMyCounter is nil.

prometheus/histogram.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ type HistogramOpts struct {
372372
// string.
373373
Help string
374374

375-
//Unit provides the unit of this Histogram
375+
//Unit provides the unit of this Histogram.
376376
Unit string
377377

378378
// ConstLabels are used to attach fixed labels to this metric. Metrics

prometheus/metric.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type Opts struct {
8181
// string.
8282
Help string
8383

84-
// Unit provides the unit of this metric
84+
// Unit provides the unit of this metric.
8585
Unit string
8686

8787
// ConstLabels are used to attach fixed labels to this metric. Metrics

prometheus/summary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ type SummaryOpts struct {
101101
// string.
102102
Help string
103103

104-
// Unit provides the unit of the metric
104+
// Unit provides the unit of this Summary.
105105
Unit string
106106

107107
// ConstLabels are used to attach fixed labels to this metric. Metrics

0 commit comments

Comments
 (0)