- Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wantedwebsite
Milestone
Description
Go version
go version go1.23.2 darwin/arm64
Output of go env in your module/workspace:
N/AWhat did you do?
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 -help usage: go mod tidy [-e] [-v] [-x] [-diff] [-go=version] [-compat=version] Run 'go help mod tidy' for details. $ go help mod tidy usage: 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's packages and dependencies, and it removes unused modules that don't provide any relevant packages. It also adds any missing entries to go.sum and removes any unnecessary ones. The -v flag causes tidy to print information about removed modules to standard error. The -e flag causes tidy to attempt to proceed despite errors encountered while loading packages. The -diff flag causes tidy not to modify go.mod or go.sum but instead print the necessary changes as a unified diff. It exits with a non-zero code if the diff is not empty. The -go flag causes tidy to update the 'go' directive in the go.mod file to the given version, which may change which module dependencies are retained as explicit requirements in the go.mod file. (Go versions 1.17 and higher retain more requirements in order to support lazy module loading.) The -compat flag preserves any additional checksums needed for the 'go' command from the indicated major Go release to successfully load the module graph, and causes tidy to error out if that version of the 'go' command would load any imported package from a different module version. By default, tidy acts as if the -compat flag were set to the version prior to the one indicated by the 'go' directive in the go.mod file. 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.
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).
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wantedwebsite