Set Ready For Review
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
} else if f.Usage != "change to `dir` before running the command" {do we use backticks in other places? should this be 'dir'?
"golang.org/x/sync/semaphore"did gofmt move this?
downloadJSON = cmdDownload.Flag.Bool("json", false, "print a sequence of JSON objects")maybe add "describing each downloaded module (or failure)"
cmdTidy.Flag.BoolVar(&tidyDiff, "diff", false, "display the differences with the proposed tidy rules")"proposed tidy rules" sounds a bit unclear to me.
maybe something like "display the diff of the edits that would be made" ?
cmdTidy.Flag.Var(&tidyCompat, "compat", "set the Go `version` for which the tidied go.mod and go.sum files should be compatible")Off topic, but I think we should maybe change this to have no effect for 1.21+ modules...
cmd.Flag.Var((*base.StringsFlag)(&cfg.BuildToolexec), "toolexec", "a `program` to use to invoke toolchain programs like vet and asm")maybe we should point to go help build for more information about toolexec?
cmd.Flag.StringVar(&cfg.DebugActiongraph, "debug-actiongraph", "", "write action graph to `file`")We should skip printing these flags' docs, and maybe leave the help text blank.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
} else if f.Usage != "change to `dir` before running the command" {do we use backticks in other places? should this be 'dir'?
This test is a bit weird, but it identifies where the -C is from by checking the usage string, in this case
src/cmd/go/internal/base/flag.go Line 65.
The backticks in the usage message are for the flag package https://pkg.go.dev/flag#PrintDefaults
where it uses the back quoted value in the short usage, otherwise all of them default to the literal string `value`, like: `-someflag value`
Sean Liaostray?
I'll undo this, I accidentally had gopls.gofumpt setting on for some edits.
"golang.org/x/sync/semaphore"Sean Liaodid gofmt move this?
gopls, when locals is set (if not it just lumps cmd/ with the standard library).
I believe this ordering is consistent with the other files.
downloadJSON = cmdDownload.Flag.Bool("json", false, "print a sequence of JSON objects")maybe add "describing each downloaded module (or failure)"
Done
cmdTidy.Flag.BoolVar(&tidyDiff, "diff", false, "display the differences with the proposed tidy rules")"proposed tidy rules" sounds a bit unclear to me.
maybe something like "display the diff of the edits that would be made" ?
Done
cmd.Flag.Var((*base.StringsFlag)(&cfg.BuildToolexec), "toolexec", "a `program` to use to invoke toolchain programs like vet and asm")maybe we should point to go help build for more information about toolexec?
Done
cmd.Flag.StringVar(&cfg.DebugActiongraph, "debug-actiongraph", "", "write action graph to `file`")We should skip printing these flags' docs, and maybe leave the help text blank.
I don't think there's actually a way to hide flags in a flag.FlagSet though
unless we preparse the args and remove them?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +2 |
cmd.Flag.StringVar(&cfg.DebugActiongraph, "debug-actiongraph", "", "write action graph to `file`")Sean LiaoWe should skip printing these flags' docs, and maybe leave the help text blank.
I don't think there's actually a way to hide flags in a flag.FlagSet though
unless we preparse the args and remove them?
ok i think leaving the documentation empty is good for now.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
cmd/go: print flags in -h / -help
For #63659
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |