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

refactor: modernize code (#7850)

Enable the
[`modernize`](https://golangci-lint.run/docs/linters/configuration/#modernize)
linter in the golangci-lint configuration and fix the reported issues by
running `golangci-lint run --enable-only modernize --fix`. The
`modernize` linter is internally the same as [gopls
modernize](https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize).

Similar to #7089.
This commit is contained in:
Oleksandr Redko
2026-01-30 19:15:17 +02:00
committed by GitHub
parent fd5d030c0a
commit 3264bf171b
25 changed files with 101 additions and 138 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ func TestImplementationNoPanics(t *testing.T) {
// methods added to it than the No-Op implementation implements them.
t.Run("LoggerProvider", assertAllExportedMethodNoPanic(
reflect.ValueOf(LoggerProvider{}),
reflect.TypeOf((*log.LoggerProvider)(nil)).Elem(),
reflect.TypeFor[log.LoggerProvider](),
))
t.Run("Logger", assertAllExportedMethodNoPanic(
reflect.ValueOf(Logger{}),
reflect.TypeOf((*log.Logger)(nil)).Elem(),
reflect.TypeFor[log.Logger](),
))
}