cmd/go: be more forgiving with matching names for help #51300
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The go help output for topics is mostly good, but guessing how to spell the name of a particular topic can be difficult due to a combination of inconsistencies in the names matched, rigidity in the matching, and little assistance except asking for the full list. For example, is it singular (
go help testflag
) or plural (go help modules
)? Is it hyphenated (go help module-get
(notmodules-get
!)) or not (go help buildmode
)?The output for commands is less troubled, as it is quicker to access the list and the rules just match the commands, which are short and a little bit consistent already. But even here, I had to look at the list again today, as the command is called "work" but the feature is always called "workspaces".
I suggest the matching algorithm be relaxed. I don't have a particular preference about the mechanism, but it could be as simple as having multiple names for a given command or topic (work, workspace, workspaces), using a prefix-driven algorithm, or some edit distance thing. In practice I find the last form steps too far from the goal, so the one of first two approaches would be my choice, but really anything less rigid would be an improvement.
This sort of thing is a common courtesy honored by many programs in the world. The go command could strive to be more accommodating.
The text was updated successfully, but these errors were encountered: