golang/go

godoc: suggestion: the godoc.org page for package containing the go.mod file should also show an import path specified in the go.mod file

zigo101 opened this issue · 3 comments

For example, this package https://godoc.org/github.com/go101/tinyrouter specified its import path in go.mod as go101.org/tinyrouter instead of its hosing path. Now the doc page only show an import path as the hosting path at the beginning of the path. I think it should also list the import path which is specified in go.mod.

It would be better if the doc page can suggest a replace line for package users
if the godoc program finds that the hosting path and the module path specified
in the go.mod file are not consistent. For example:

Please add the following line in your go.mod file to use this package
if your project supports modules:

    replace go101.org/tinyrouter => github.com/go101/tinyrouter v1.0.1

Hi, we have #26827 as the umbrella issue for tracking module support to godoc. Please add your comments there. Thank you.