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
+1 -1
View File
@@ -23,7 +23,7 @@ func TestErrorType(t *testing.T) {
builtinErr := errors.New("something went wrong")
var nilErr error
wantCustomType := reflect.TypeOf(customErr)
wantCustomType := reflect.TypeFor[CustomError]()
wantCustomStr := fmt.Sprintf("%s.%s", wantCustomType.PkgPath(), wantCustomType.Name())
tests := []struct {
+1 -1
View File
@@ -23,7 +23,7 @@ func TestErrorType(t *testing.T) {
builtinErr := errors.New("something went wrong")
var nilErr error
wantCustomType := reflect.TypeOf(customErr)
wantCustomType := reflect.TypeFor[CustomError]()
wantCustomStr := fmt.Sprintf("%s.%s", wantCustomType.PkgPath(), wantCustomType.Name())
tests := []struct {