While not a tool, there is code that can be bent to this in golang.org/x/pkgsite/internal/source. I used that to get repo information for a tool to obtain homepage and issue page links from Go executables[1]. You could easily extend that kind of approach to get the actual repo at the relevant version.
[1] https://github.com/kortschak/ugbt/blob/master/internal/modrepo/repo.go On Wed, 2022-01-12 at 12:43 -0800, Kevin Burke wrote: > Ah, yes, that would work but wouldn't include the git history... > > On Wednesday, January 12, 2022 at 12:28:49 PM UTC-8 > robert...@gmail.com wrote: > > https://go.dev/ref/mod#go-mod-vendor > > > > On Wed, Jan 12, 2022 at 10:58 AM Kevin Burke <ke...@burke.dev> > > wrote: > > > Hi, > > > Sometimes I just want to inspect third party code for a library, > > > and/or edit it. > > > > > > I'm looking for a tool that will read all of the dependencies in > > > a go.mod file and then check out all of the right versions of all > > > of the source code into the right places in a $GOPATH. Does that > > > exist? > > > > > > Failing that, is there a tool that will read a go.mod file and > > > give me version information about each dependency? I see > > > packages.Load, but that doesn't seem super targeted for the use > > > case; if it's the best that exists then I'll probably make it > > > work. > > > > > > Kevin > > > > > > -- 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/8c63ec052f1456081dcb391270b6ad211cb87995.camel%40kortschak.io.