You've already forked opentelemetry-go
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:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user