Skip to content

Commit b6cdd1a

Browse files
cuishuanggopherbot
authored andcommitted
modfile: use reflect.TypeFor instead of reflect.TypeOf
For golang/go#60088. Change-Id: I7c503c5a18aa7c6de1ffc0c5c115e1a588b2a9e6 Reviewed-on: https://go-review.googlesource.com/c/mod/+/709175 Auto-Submit: Sean Liao <sean@liao.dev> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
1 parent bba3e06 commit b6cdd1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modfile/read_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ func (eq *eqchecker) check(v, w interface{}) error {
251251
}
252252

253253
var (
254-
posType = reflect.TypeOf(Position{})
255-
commentsType = reflect.TypeOf(Comments{})
254+
posType = reflect.TypeFor[Position]()
255+
commentsType = reflect.TypeFor[Comments]()
256256
)
257257

258258
// checkValue checks that v and w represent the same parse tree.

0 commit comments

Comments
 (0)