Go version
latest
Output of go env in your module/workspace:
What did you do?
go help tool
What did you see happen?
No mention of -modfile
What did you expect to see?
Available flags are documented. Given the issues around default modfile sharing with the tools and the main project, using alternative mod files is likely to be very common. Documenting the flags available will ensure users do not reach to weird workarounds rather than just do -modfile=tools/go.mod or similar.
Go version
latest
Output of
go envin your module/workspace:What did you do?
go help toolWhat did you see happen?
No mention of
-modfileWhat did you expect to see?
Available flags are documented. Given the issues around default modfile sharing with the tools and the main project, using alternative mod files is likely to be very common. Documenting the flags available will ensure users do not reach to weird workarounds rather than just do
-modfile=tools/go.modor similar.