From b6cdd1a97c6a688a6a842cdc667ec2e68174ba9d Mon Sep 17 00:00:00 2001 From: cuishuang Date: Sun, 5 Oct 2025 16:00:46 +0800 Subject: [PATCH 1/3] 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 LUCI-TryBot-Result: Go LUCI Reviewed-by: Sean Liao Reviewed-by: Michael Pratt Reviewed-by: Carlos Amedee --- modfile/read_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modfile/read_test.go b/modfile/read_test.go index 8f17eea..8bf05e2 100644 --- a/modfile/read_test.go +++ b/modfile/read_test.go @@ -251,8 +251,8 @@ func (eq *eqchecker) check(v, w interface{}) error { } var ( - posType = reflect.TypeOf(Position{}) - commentsType = reflect.TypeOf(Comments{}) + posType = reflect.TypeFor[Position]() + commentsType = reflect.TypeFor[Comments]() ) // checkValue checks that v and w represent the same parse tree. From 5517a715a62aaf2d2ab02e64ce67586c60767e8f Mon Sep 17 00:00:00 2001 From: cuishuang Date: Mon, 20 Oct 2025 18:13:54 +0800 Subject: [PATCH 2/3] all: fix some comments Change-Id: Ic8faee52db43f1c669dbc8d141eeda3c7093bd29 Reviewed-on: https://go-review.googlesource.com/c/mod/+/712901 Auto-Submit: Sean Liao Reviewed-by: Sean Liao Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: David Chase --- modfile/read.go | 2 +- module/module.go | 2 +- semver/semver.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modfile/read.go b/modfile/read.go index 2d74868..f58de02 100644 --- a/modfile/read.go +++ b/modfile/read.go @@ -94,7 +94,7 @@ func (x *FileSyntax) Span() (start, end Position) { // line, the new line is added at the end of the block containing hint, // extracting hint into a new block if it is not yet in one. // -// If the hint is non-nil buts its first token does not match, +// If the hint is non-nil but its first token does not match, // the new line is added after the block containing hint // (or hint itself, if not in a block). // diff --git a/module/module.go b/module/module.go index 16e1aa7..9d3955b 100644 --- a/module/module.go +++ b/module/module.go @@ -261,7 +261,7 @@ func modPathOK(r rune) bool { // importPathOK reports whether r can appear in a package import path element. // -// Import paths are intermediate between module paths and file paths: we allow +// Import paths are intermediate between module paths and file paths: we // disallow characters that would be confusing or ambiguous as arguments to // 'go get' (such as '@' and ' ' ), but allow certain characters that are // otherwise-unambiguous on the command line and historically used for some diff --git a/semver/semver.go b/semver/semver.go index 628f8fd..824b282 100644 --- a/semver/semver.go +++ b/semver/semver.go @@ -45,8 +45,8 @@ func IsValid(v string) bool { // Canonical returns the canonical formatting of the semantic version v. // It fills in any missing .MINOR or .PATCH and discards build metadata. -// Two semantic versions compare equal only if their canonical formattings -// are identical strings. +// Two semantic versions compare equal only if their canonical formatting +// is an identical string. // The canonical invalid semantic version is the empty string. func Canonical(v string) string { p, ok := parse(v) From 7416265ac6eca137286fb2adcc87f9feec458b4c Mon Sep 17 00:00:00 2001 From: Gopher Robot Date: Sat, 8 Nov 2025 04:01:50 -0800 Subject: [PATCH 3/3] go.mod: update golang.org/x dependencies Update golang.org/x dependencies to their latest tagged versions. Change-Id: Ia6304fe977a0f19eeb57f77742f1bd1a78ce534c Reviewed-on: https://go-review.googlesource.com/c/mod/+/718960 Auto-Submit: Gopher Robot Reviewed-by: Dmitri Shuralyov Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 192bf6f..6b71fa7 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module golang.org/x/mod go 1.24.0 -require golang.org/x/tools v0.37.0 // tagx:ignore +require golang.org/x/tools v0.38.0 // tagx:ignore diff --git a/go.sum b/go.sum index 4ae2b11..85d99f4 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE= -golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w= +golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= +golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs=