Skip to content

Commit 9adb940

Browse files
authored
[chore] prevent unkeyed literal initialization (#43790)
This is flagged with checkapi 0.28.1.
1 parent deea5bd commit 9adb940

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/translator/signalfx/to_metrics.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import (
1515
const numMetricTypes = 4
1616

1717
// ToTranslator converts from SignalFx proto data model to pdata.
18-
type ToTranslator struct{}
18+
type ToTranslator struct {
19+
// prevent unkeyed literal initialization
20+
_ struct{}
21+
}
1922

2023
// ToMetrics converts SignalFx proto data points to pmetric.Metrics.
2124
func (*ToTranslator) ToMetrics(sfxDataPoints []*model.DataPoint) (pmetric.Metrics, error) {

0 commit comments

Comments
 (0)