Hi everyone, In the absence of an answer, I reply here to make this thread go back to top.
For the moment I have worked around my issue by just adding a subdirectory in gest/ (see hierarchy above), and *//go:generate*'ing on this package. This works here because this sub-package does not import anything except std. But, even if the problem is more specific than I think or I will never really use the fix, I'm curious as to why I observe the aforementioned behaviour. If anyone could give some ideas / insights, it'd be great! Thank you all in advance and please do not hesitate to ask for more precisions! :D Le lundi 14 juin 2021 à 09:14:37 UTC+2, mlevi...@gmail.com a écrit : > Hi guys, > > Didn't really know what to put in the title, I have a file hierarchy like > the following: > - gest (root of module) > -- cmd > --- gesterate > ---- command files (see below) > -- internal > --- callstack > ---- internal library files (see below) > -- library files (see below) > > in the cmd/gesterate/ folder there is some code that should generate code > upon calling go generate (it needs to be installed logically) > in the internal/callstack folder there is an internal library that is used > by the library files in the root folder (gest/) > > In order to test my code generation tool in cmd/gesterate, I put a //go > generate ... pragma in one of my files in gest/, and tried to call go > generate on the root folder. I use the go/importer package with the Default > importer > > It throws me the following error, which I'm having a hard time > understanding where it comes from and why it is so: > could not import github.com/mlevieux/gest/internal/callstack (can't find > import: "github.com/mlevieux/gest/internal/callstack") > > The repo itself is private on github but I'll gladly share pieces of code > if needed. > Thx in advance guys! > -- 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/0cadca1a-d024-4d75-81ca-6fb820413d27n%40googlegroups.com.