linter pass 2

This commit is contained in:
Joe Kralicky 2024-12-06 04:12:55 +00:00
parent e26fb04e93
commit dda27de4f2
No known key found for this signature in database
GPG key ID: 75C4875F34A9FB79
4 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ func NewServer(ctx context.Context, remoteClient otlptrace.Client) *ExporterServ
return ex return ex
} }
func (srv *ExporterServer) Start(ctx context.Context) { func (srv *ExporterServer) Start() {
lis := bufconn.Listen(4096) lis := bufconn.Listen(4096)
go func() { _ = srv.server.Serve(lis) }() go func() { _ = srv.server.Serve(lis) }()
cc, err := grpc.NewClient("passthrough://ignore", cc, err := grpc.NewClient("passthrough://ignore",

View file

@ -72,7 +72,7 @@ func (op Options) NewContext(ctx context.Context) context.Context {
} }
ctx = context.WithValue(ctx, systemContextKey, sys) ctx = context.WithValue(ctx, systemContextKey, sys)
sys.exporterServer = NewServer(ctx, remoteClient) sys.exporterServer = NewServer(ctx, remoteClient)
sys.exporterServer.Start(ctx) sys.exporterServer.Start()
return ctx return ctx
} }

View file

@ -81,7 +81,7 @@ func TestOTLPTracing(t *testing.T) {
func TestSampling(t *testing.T) { func TestSampling(t *testing.T) {
requireOTLPTracesEndpoint(t) requireOTLPTracesEndpoint(t)
env := testenv.New(t, testenv.AddTraceDebugFlags(testenv.StandardTraceDebugFlags)) env := testenv.New(t, testenv.AddTraceDebugFlags(testenv.StandardTraceDebugFlags))
env.Add(testenv.ModifierFunc(func(ctx context.Context, cfg *config.Config) { env.Add(testenv.ModifierFunc(func(_ context.Context, cfg *config.Config) {
cfg.Options.TracingSampleRate = 0.5 cfg.Options.TracingSampleRate = 0.5
})) }))
defer env.Stop() defer env.Stop()

View file

@ -406,8 +406,8 @@ func authenticateFlow(ctx context.Context, client *http.Client, req *http.Reques
return res, nil return res, nil
} }
fs := forms.Parse(res.Body) fs := forms.Parse(res.Body)
io.ReadAll(res.Body) _, _ = io.ReadAll(res.Body)
res.Body.Close() _ = res.Body.Close()
if len(fs) > 0 { if len(fs) > 0 {
f := fs[0] f := fs[0]
f.Inputs["email"] = email f.Inputs["email"] = email