Skip to content

Commit

Permalink
Remove redundant type assertion (golangci-lint)
Browse files Browse the repository at this point in the history
  • Loading branch information
kvrhdn committed Jul 12, 2021
1 parent 50d5dca commit dc64847
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions modules/distributor/receiver/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,12 @@ func New(receiverCfg map[string]interface{}, pusher tempopb.PusherServer, multit
return nil, fmt.Errorf("receiver factory not found for type: %s", cfg.Type())
}

if factory, ok := factoryBase.(component.ReceiverFactory); ok {
receiver, err := factory.CreateTracesReceiver(ctx, params, cfg, shim)
if err != nil {
return nil, err
}

shim.receivers = append(shim.receivers, receiver)
continue
}

/*factory := factoryBase.(component.ReceiverFactoryOld)
receiver, err := factory.CreateTraceReceiver(ctx, zapLogger, cfg, converter.NewOCToInternalTraceConverter(shim))
receiver, err := factoryBase.CreateTracesReceiver(ctx, params, cfg, shim)
if err != nil {
return nil, err
}
shim.receivers = append(shim.receivers, receiver)*/

shim.receivers = append(shim.receivers, receiver)
}

shim.Service = services.NewIdleService(shim.starting, shim.stopping)
Expand Down

0 comments on commit dc64847

Please sign in to comment.