You've already forked opentelemetry-go
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:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user