3 ms·
If you had tried using it or otherwise knew what you were talking about you would know that you use it by specifying relative or absolute import paths for any p
by arghwhat 5y ago
If you had tried using it or otherwise knew what you were talking about you would know that you use it by specifying relative or absolute import paths for any package fetched with go mod or $GOPATH.
Just in case this needs an ELI5: it queries project packages to print the relevant documentation for any accessible component: “go doc container/list.List” - bar any typos from a phone keyboard - prints all documentation for the stdlib linked list. In case Rust had a decent doc tool it would be the equivalent of “rust doc std::collections::LinkedList”.
(And no, that the Go tool needs to do less work to find all relevant documentation than a Rust equivalent is not relevant to the discussion.)
- masklinn 5y agoThank you for once again proving the point which you keep missing: you have to give `go doc` a path to a module, which means you have to know where the symbol you’re looking up lives. Which has nothing to do with the article, or my comments. The entire issue of the comment is that Eli has a symbol whose origin they don’t know. Where the symbol comes from is 75% of the question. Of course if you want the documentation of a symbol whose full qualification you know `go doc` gives you that, that’s what I wrote above. But it’s not TFA’s problem, and thus not the problem anyone’s trying to solve here.