diff --git a/instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go b/instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go index 24a3489e789..4ca50cb7ca1 100644 --- a/instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go +++ b/instrumentation/github.com/astaxie/beego/otelbeego/test/beego_test.go @@ -192,6 +192,7 @@ func TestStatic(t *testing.T) { meterProvider, metricExporter := metrictest.NewTestMeterProvider() file, err := os.CreateTemp("", "static-*.html") require.NoError(t, err) + defer file.Close() defer os.Remove(file.Name()) _, err = file.WriteString(beego.Htmlunquote("