You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I happened to know that go mod tidy -diff was added in 1.23 🎉 , but a quick web search for go mod tidy returned https://go.dev/ref/mod#go-mod-tidy, which does not list the new -diff flag. It is correctly shown in cmd/go help text:
$ go mod tidy -helpusage: go mod tidy [-e] [-v] [-x] [-diff] [-go=version] [-compat=version]Run 'go help mod tidy' for details.
$ go help mod tidyusage: go mod tidy [-e] [-v] [-x] [-diff] [-go=version] [-compat=version]Tidy makes sure go.mod matches the source code in the module.It adds any missing modules necessary to build the current module'spackages and dependencies, and it removes unused modules thatdon't provide any relevant packages. It also adds any missing entriesto go.sum and removes any unnecessary ones.The -v flag causes tidy to print information about removed modulesto standard error.The -e flag causes tidy to attempt to proceed despite errorsencountered while loading packages.The -diff flag causes tidy not to modify go.mod or go.sum butinstead print the necessary changes as a unified diff. It exitswith a non-zero code if the diff is not empty.The -go flag causes tidy to update the 'go' directive in the go.modfile to the given version, which may change which module dependenciesare retained as explicit requirements in the go.mod file.(Go versions 1.17 and higher retain more requirements in order tosupport lazy module loading.)The -compat flag preserves any additional checksums needed for the'go' command from the indicated major Go release to successfully loadthe module graph, and causes tidy to error out if that version of the'go' command would load any imported package from a different moduleversion. By default, tidy acts as if the -compat flag were set to theversion prior to the one indicated by the 'go' directive in the go.modfile.The -x flag causes tidy to print the commands download executes.See https://golang.org/ref/mod#go-mod-tidy for more about 'go mod tidy'.
What did you see happen?
The command help also points to the website, which doesn't list the flag.
Go version
go version go1.23.2 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
I happened to know that
go mod tidy -diff
was added in 1.23 🎉 , but a quick web search forgo mod tidy
returned https://go.dev/ref/mod#go-mod-tidy, which does not list the new-diff
flag. It is correctly shown incmd/go
help text:What did you see happen?
The command help also points to the website, which doesn't list the flag.
What did you expect to see?
-diff
flag documentation added on the website. 😄 Apologies if this isn't the correct place to file this sort of issue (was just following the directions at the bottom of https://github.com/golang/website/blob/master/README.md#report-issues--send-patches).The text was updated successfully, but these errors were encountered: