3caf507246744f68f1be42317f70a850a1346c0a
OnlyValidArgs reports the offending argument correctly ("invalid
argument %q") but computed the "Did you mean this?" suggestion from
args[0]. When the invalid argument is not the first one, the suggestion
was therefore based on an unrelated (valid) argument, so it was missing
or pointed at the wrong token.
Compute the suggestion from the argument actually being reported, so it
always matches the invalid argument regardless of its position.
Languages
Go
100%