I know that you're asking about how to do this with the standard tools, but you can do this with grep if you're on a platform that has the command available:
grep --recursive --files-with-matches "//go:generate" or, for short: grep -rl "//go:generate" This command will output a list of files with "//go:generate" in them, separated by newlines. Might be a good alternative if there's no way to do this with the go command. On Mon, Nov 9, 2020 at 8:00 AM gta <[email protected]> wrote: > Hello, > is there a way to list all the files that have a `//go:generate` directive > with the standard tools? > I see that `go list` can show the ignored files so I am assuming it is > detecting `// +build ignore` directives, but I found nothing to lit the go > generate target files. > > Thanks in advance, > > Giacomo > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/c45f0126-dd61-444d-a351-729132bf25fdn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/c45f0126-dd61-444d-a351-729132bf25fdn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu2q7T0tCkWaRTiQ4DyCqROVFKrN5q%2BncFb7Qgd%2BBTgXpQ%40mail.gmail.com.
