Skip to content

Commit 274df2c

Browse files
committed
update
1 parent fee9b7f commit 274df2c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/en/docs/languages/go/instrumentation.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,7 @@ import (
512512
var itemsCounter metric.Int64UpDownCounter
513513

514514
func init() {
515-
var err error
516-
itemsCounter, err = meter.Int64UpDownCounter(
515+
itemsCounter, err := meter.Int64UpDownCounter(
517516
"items.counter",
518517
metric.WithDescription("Number of items."),
519518
metric.WithUnit("{item}"),
@@ -549,9 +548,10 @@ import (
549548
"go.opentelemetry.io/otel/metric"
550549
)
551550

552-
var fanSpeedSubscription chan int64
553-
554-
var speedGauge metric.Int64Gauge
551+
var (
552+
fanSpeedSubscription chan int64
553+
speedGauge metric.Int64Gauge
554+
)
555555

556556
func init() {
557557
speedGauge, err := meter.Int64Gauge(

0 commit comments

Comments
 (0)