1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

chore: enable unused-receiver rule from revive (#7130)

#### Description

Enable and fixes
[unused-receiver](https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unused-receiver)
rule from revive

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-08-09 00:38:22 +02:00
committed by GitHub
parent 4b0c8f174b
commit 68841fa6db
53 changed files with 123 additions and 122 deletions
+2 -2
View File
@@ -53,12 +53,12 @@ func (o *Tracer) StartSpanWithRemoteParent(
}
// FromContext returns the Span stored in a context.
func (o *Tracer) FromContext(ctx context.Context) *octrace.Span {
func (*Tracer) FromContext(ctx context.Context) *octrace.Span {
return NewSpan(trace.SpanFromContext(ctx))
}
// NewContext returns a new context with the given Span attached.
func (o *Tracer) NewContext(parent context.Context, s *octrace.Span) context.Context {
func (*Tracer) NewContext(parent context.Context, s *octrace.Span) context.Context {
if otSpan, ok := s.Internal().(*Span); ok {
return trace.ContextWithSpan(parent, otSpan.otelSpan)
}
+1 -1
View File
@@ -139,7 +139,7 @@ type differentSpan struct {
octrace.SpanInterface
}
func (s *differentSpan) String() string { return "testing span" }
func (*differentSpan) String() string { return "testing span" }
func TestTracerNewContextErrors(t *testing.T) {
h, restore := withHandler()