But having a way to (only) print the exact commands that will be run after all substitutions are done would be awesome.
Is this intended to be covered by -x and -n flags?
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
-rob
This is beautiful! Simplistic and powerful. I love the idea for generating custom sort types as well as the idea for embedding binary data.I could imagine another use-case for this as well: SWIG.
- SWIG would not have to be installed by anyone downloading a package.
- SWIG API's could be viewed in godoc, etc.
Of course, this would mean SWIG would have to generate code which can be compiled on every platform, but AFAIK it is already pretty close to that.
The -run flag takes a regular expression, analogous to that of the go test subcommand, that restricts generation to those directives whose command (see below) matches the regular expression.
//go:generate protoc foo.proto//go:generate protoc bar.proto//go:generate protoc baz.proto
-rob
New go tool subcommand proposed for Go 1.4. Please see the design
document and comment in this thread.
http://golang.org/s/go1.4-generate
-rob
what's the gain for the
effort of rewriting the Makefile into the annotations? I cannot find
the answer in the design document.
Can we standardize around the existing convention instead, or at least
support go:build and obsolete +build so we can eventually converge?
Agreed. And the user can always create whatever groupings they want by putting generate directives that should run together in the same go source file.