Skip to content

Commit 9a2a707

Browse files
authored
[chore] Fix linter (#6188)
1 parent 55e226b commit 9a2a707

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

pkg/receiver/smartagentreceiver/config.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ const defaultIntervalSeconds = 10
3535
var (
3636
_ confmap.Unmarshaler = (*Config)(nil)
3737

38-
errDimensionClientValue = fmt.Errorf("dimensionClients must be an array of compatible exporter names")
39-
nonWindowsMonitors = map[string]bool{
38+
nonWindowsMonitors = map[string]bool{
4039
"collectd/activemq": true, "collectd/apache": true, "collectd/cassandra": true, "collectd/chrony": true,
4140
"collectd/cpu": true, "collectd/cpufreq": true, "collectd/custom": true,
4241
"collectd/genericjmx": true, "collectd/hadoopjmx": true, "collectd/kafka": true, "collectd/kafka_consumer": true,
@@ -48,13 +47,12 @@ var (
4847
)
4948

5049
type Config struct {
51-
MonitorType string `mapstructure:"type"` // Smart Agent monitor type, e.g. collectd/cpu
50+
monitorConfig saconfig.MonitorCustomConfig
51+
MonitorType string `mapstructure:"type"` // Smart Agent monitor type, e.g. collectd/cpu
5252
// Generally an observer/receivercreator-set value via Endpoint.Target.
5353
// Will expand to MonitorCustomConfig Host and Port values if unset.
5454
Endpoint string `mapstructure:"endpoint"`
5555
DimensionClients []string `mapstructure:"dimensionClients"`
56-
57-
monitorConfig saconfig.MonitorCustomConfig
5856
acceptsEndpoints bool
5957
}
6058

pkg/receiver/smartagentreceiver/receiver_test.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ import (
2626
"testing"
2727
"time"
2828

29+
saconfig "github.com/signalfx/signalfx-agent/pkg/core/config"
30+
"github.com/signalfx/signalfx-agent/pkg/monitors"
31+
"github.com/signalfx/signalfx-agent/pkg/monitors/cpu"
32+
"github.com/signalfx/signalfx-agent/pkg/utils/hostfs"
2933
"github.com/stretchr/testify/assert"
3034
"github.com/stretchr/testify/require"
3135
"go.opentelemetry.io/collector/component"
@@ -44,11 +48,6 @@ import (
4448
"go.uber.org/zap/zapcore"
4549
"go.uber.org/zap/zaptest/observer"
4650

47-
saconfig "github.com/signalfx/signalfx-agent/pkg/core/config"
48-
"github.com/signalfx/signalfx-agent/pkg/monitors"
49-
"github.com/signalfx/signalfx-agent/pkg/monitors/cpu"
50-
"github.com/signalfx/signalfx-agent/pkg/utils/hostfs"
51-
5251
"github.com/signalfx/splunk-otel-collector/pkg/extension/smartagentextension"
5352
)
5453

0 commit comments

Comments
 (0)