Skip to content

Commit e6fe359

Browse files
committed
Fix lint errors
1 parent e599c98 commit e6fe359

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

processor/tailsamplingprocessor/processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ func (*tailSamplingSpanProcessor) Capabilities() consumer.Capabilities {
655655
}
656656

657657
// Start is invoked during service startup.
658-
func (tsp *tailSamplingSpanProcessor) Start(ctx context.Context, host component.Host) error {
658+
func (tsp *tailSamplingSpanProcessor) Start(_ context.Context, host component.Host) error {
659659
// We need to store the host before loading sampling policies in order to load any extensions.
660660
tsp.host = host
661661
if tsp.policies == nil {

processor/tailsamplingprocessor/processor_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,10 @@ func TestDuplicatePolicyName(t *testing.T) {
732732
})
733733
require.NoError(t, err)
734734
err = p.Start(t.Context(), componenttest.NewNopHost())
735-
defer p.Shutdown(t.Context())
735+
defer func() {
736+
err := p.Shutdown(t.Context())
737+
require.NoError(t, err)
738+
}()
736739

737740
// verify
738741
assert.Equal(t, err, errors.New(`duplicate policy name "always_sample"`))
@@ -809,7 +812,10 @@ func TestDropPolicyIsFirstInPolicyList(t *testing.T) {
809812
require.NoError(t, err)
810813
err = p.Start(t.Context(), componenttest.NewNopHost())
811814
require.NoError(t, err)
812-
defer p.Shutdown(t.Context())
815+
defer func() {
816+
err := p.Shutdown(t.Context())
817+
require.NoError(t, err)
818+
}()
813819

814820
tsp := p.(*tailSamplingSpanProcessor)
815821
require.GreaterOrEqual(t, len(tsp.policies), 2)
@@ -1100,11 +1106,11 @@ func (e *extension) NewEvaluator(policyName string, cfg map[string]any) (samplin
11001106
}
11011107

11021108
// Start implements component.Component.
1103-
func (e extension) Start(ctx context.Context, host component.Host) error {
1109+
func (e extension) Start(_ context.Context, _ component.Host) error {
11041110
return nil
11051111
}
11061112

11071113
// Shutdown implements component.Component.
1108-
func (e extension) Shutdown(ctx context.Context) error {
1114+
func (e extension) Shutdown(_ context.Context) error {
11091115
return nil
11101116
}

0 commit comments

Comments
 (0)