Thanks to all for assistance with this!
 
Got it working with (perhaps) the most recent version - though once again 
it looks to have moved from the path(s) mentioned above.  Part of my 
problem was not looking specifically for the "Third Party" section since 
before my code had all been lumped in at the top with the standard library 
sections.  That's an improvement I agree.  Also not mentioned specifically 
is there exist both a package and a command by the name godoc.  You need to 
compile them separately - paying attention to the need to "go generate" the 
static section of the package first.  It had been a while since I last had 
to do this so it took awhile to (re)discover the secret sauce ingredients.

While I'm still hoping to eventually see programs added to the godoc 
feature set I'm at least back to where we were before I started the module 
experiment.  So far it looks like a pretty straight forward - though a bit 
labor intensive in my case.

David
On Sunday, March 28, 2021 at 10:30:47 AM UTC-4 seank...@gmail.com wrote:

> Assuming a recent enough version of `godoc`, running it from within a 
> module should include the documentation for the standard library (standard 
> library section), that module, and all its dependencies (third party 
> section)
> Expected output should be similar to:
>
> $ godoc
> using module mode; GOMOD=/home/arccy/testrepo-337/go.mod
>
> It doesn't handle documentation across multiple, unrelated modules, but 
> you could work around it by defining a dummy package & module with imports 
> to the modules you wish to include (use replace to point to the local 
> version) and running `godoc` from the dummy module
>
> On Sunday, March 28, 2021 at 4:01:37 PM UTC+2 Hotei wrote:
>
>> Clarification.  As mentioned earlier, $GOPATH is supposed to go away in 
>> the (possibly near) future so one of my main goals is to get it working 
>> outside the $GOPATH tree.  At present my solution has been to copy my 
>> source tree (about 4 GB) to a "non-module-aware" go ecosystem on a 
>> different machine and browse over my local network to the old godoc version 
>> there.    While it works (for the moment) it's not a very efficient or 
>> maintainable solution.  The possibility of easy to maintain documentation 
>> has always been one of go's strengths thanks to gofmt and godoc.  Hate to 
>> lose half that advantage if there's a way around it.
>> David Rook
>>
>> On Sunday, March 28, 2021 at 7:05:01 AM UTC-4 m8il...@gmail.com wrote:
>>
>>> I found you had to cd to each directory with a .mod file and run it 
>>> there. A global option would be nice to know about.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/ca3a64e5-fe14-42b0-bbec-cc60de6e2b9bn%40googlegroups.com.

Reply via email to