Skip to content

Commit 4976c05

Browse files
authored
Small style issues in code, unnecessary wrapping (#3187)
Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 68c4a2f commit 4976c05

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

config/internal/configsource/manager_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ type valueEntry struct {
576576
WatchForUpdateFn func() error
577577
}
578578

579-
var _ (configsource.ConfigSource) = (*testConfigSource)(nil)
580-
var _ (configsource.Session) = (*testConfigSource)(nil)
579+
var _ configsource.ConfigSource = (*testConfigSource)(nil)
580+
var _ configsource.Session = (*testConfigSource)(nil)
581581

582582
func (t *testConfigSource) NewSession(context.Context) (configsource.Session, error) {
583583
if t.ErrOnNewSession != nil {
@@ -629,7 +629,7 @@ type retrieved struct {
629629
watchForUpdateFn func() error
630630
}
631631

632-
var _ (configsource.Retrieved) = (*retrieved)(nil)
632+
var _ configsource.Retrieved = (*retrieved)(nil)
633633

634634
func (r *retrieved) Value() interface{} {
635635
return r.value

exporter/jaegerexporter/exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ type protoGRPCSender struct {
8080
connStateReporterInterval time.Duration
8181
stateChangeCallbacks []func(connectivity.State)
8282

83-
stopCh chan (struct{})
83+
stopCh chan struct{}
8484
stopped bool
8585
stopLock sync.Mutex
8686
}
@@ -96,7 +96,7 @@ func newProtoGRPCSender(logger *zap.Logger, name string, cl jaegerproto.Collecto
9696
conn: conn,
9797
connStateReporterInterval: time.Second,
9898

99-
stopCh: make(chan (struct{})),
99+
stopCh: make(chan struct{}),
100100
}
101101
s.AddStateChangeCallback(s.onStateChange)
102102
return s

exporter/jaegerexporter/exporter_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ func TestConnectionStateChange(t *testing.T) {
253253
}
254254
sender := &protoGRPCSender{
255255
logger: zap.NewNop(),
256-
stopCh: make(chan (struct{})),
256+
stopCh: make(chan struct{}),
257257
conn: sr,
258258
connStateReporterInterval: 10 * time.Millisecond,
259259
}
@@ -284,7 +284,7 @@ func TestConnectionReporterEndsOnStopped(t *testing.T) {
284284

285285
sender := &protoGRPCSender{
286286
logger: zap.NewNop(),
287-
stopCh: make(chan (struct{})),
287+
stopCh: make(chan struct{}),
288288
conn: sr,
289289
connStateReporterInterval: 10 * time.Millisecond,
290290
}

receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ func TestScrape(t *testing.T) {
5151

5252
for _, test := range testCases {
5353
t.Run(test.name, func(t *testing.T) {
54-
expectProcessesCountMetric := (runtime.GOOS == "linux" || runtime.GOOS == "openbsd" || runtime.GOOS == "darwin" || runtime.GOOS == "freebsd")
55-
expectProcessesCreatedMetric := (runtime.GOOS == "linux" || runtime.GOOS == "openbsd")
54+
expectProcessesCountMetric := runtime.GOOS == "linux" || runtime.GOOS == "openbsd" || runtime.GOOS == "darwin" || runtime.GOOS == "freebsd"
55+
expectProcessesCreatedMetric := runtime.GOOS == "linux" || runtime.GOOS == "openbsd"
5656

5757
scraper := newProcessesScraper(context.Background(), &Config{})
5858
if test.miscFunc != nil {

0 commit comments

Comments
 (0)