You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Old 'godoc' web version shows the list of packages along with package synopsis (e.g. http://golang.org/pkg/compress/), which is often useful when figuring out the relationships among packages, or discovering packages. I hope the new 'doc' command provides this functionality.
One option is to list packages in the subdirectories as output of 'go doc'.
cd $GOROOT/src/compress
go doc
doc: no buildable Go source files in /Users/hakim/Local/goroots/tip/go/src/compress
exit status 1
go doc golang.org/x/mobile
doc: no such package golang.org/x/mobile
exit status 1
The text was updated successfully, but these errors were encountered:
Doc is intentionally very restricted in what it prints, to keep SNR high. The goal is explicitly to not start printing anything that might be useful, like godoc does.
It's possible that if there are no Go source files in a directory, we could list the subdirectories, but I don't even think that's right: then we'd have to decide whether to print them when there is a valid package that also has subdirectories, and I think the answer that must be no. If you say 'go doc math' you are not (usually) asking about math/rand.
In this case, there is already a command for listing packages: go list, as in go list ./....
Old 'godoc' web version shows the list of packages along with package synopsis (e.g. http://golang.org/pkg/compress/), which is often useful when figuring out the relationships among packages, or discovering packages. I hope the new 'doc' command provides this functionality.
One option is to list packages in the subdirectories as output of 'go doc'.
The text was updated successfully, but these errors were encountered: