>
> Why not just run all those generate commands in a single go generate call,
> such as a shell script or a go run?
>

>From go generate --help:

*... Within a package, generate processes the source files in a package in
> file name order, one at a time. **Within **a source file, generate runs
> generators in the order they appear **in the file, one at a time*


go generate effectively snapshots the list of files in a package at the
time it is run, scans (without parsing) for those files that contain
//go:generate, then invokes the relevant commands on the files *in the
original snapshot list* in order; hence you never "see" new files that are
generated for this invocation of go generate (hence Rob's reference to
chaining another call to go generate)

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to