From: Rob Pike Date: Fri, 17 Apr 2015 18:37:08 +0000 (-0700) Subject: doc/articles/go_command.html: mention go generate X-Git-Tag: go1.5beta1~1034 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7df2854f7087bc19ad4d23a1eed2fdfa8161b1ed;p=gostls13.git doc/articles/go_command.html: mention go generate Fix some out-of-date remarks. Fixes #10489. Change-Id: I8f0cce2588828052a5d013e7bac6bcfeb220579d Reviewed-on: https://go-review.googlesource.com/9008 Reviewed-by: Russ Cox --- diff --git a/doc/articles/go_command.html b/doc/articles/go_command.html index 2978628cd2..cc1d86aef4 100644 --- a/doc/articles/go_command.html +++ b/doc/articles/go_command.html @@ -250,11 +250,16 @@ projects at once within a single $GOPATH root directory.

Limitations

As mentioned above, the go command is not a general-purpose build -tool. In particular, it does not have any facility for generating Go -source files during a build. Instead, if you want to use a tool like -yacc or the protocol buffer compiler, you will need to write a +tool. +In particular, it does not have any facility for generating Go +source files during a build, although it does provide +go +generate, +which can automate the creation of Go files before +the build, such as by running yacc. +For more advanced build setups, you may need to write a makefile (or a configuration file for the build tool of your choice) -to generate the Go files and then check those generated source files +to run whatever tool creates the Go files and then check those generated source files into your repository. This is more work for you, the package author, but it is significantly less work for your users, who can use "go get" without needing to obtain and build