Is there a way to get proper import path when using
go/ packages to generate custom Go documentation?
build.ImportPath from both
go/build respectively. They always return the relative path
. when the input path is the same relative path.
I’m looking at removing the custom functions to read
go.mod for the import path construction here:
Any idea would be appreciated. Thanks in adv!
Unfortunately, I don’t have the answer. I haven’t yet implemented any
go generate packages, but I’m interested in doing so and I imagine knowing this information would be helpful. I’ve bookmarked this post to see if anyone else comes up with the answer. Good luck!
Thanks. I will role with the temporary workaround for the time being. The current documentations are scarce when it is related to internal sections of the Go Modules and docs.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.