Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
content/static/doc/tutorial: don't "go run" individual files
Go packages are implicitly made of all the files in a directory, filtered by build tags. This is a core mechanic of using Go and of contributing to Go projects. It's also different from many other languages, including C and Rust, where code in different compilation units can coexist in the same directory. The only exception is when Go files are specified on the command line, in which case a synthetic command-line-arguments package is composed from them, ignoring build tags. I don't think it helps beginners to expose them to this exception which they would otherwise probably never make any use of. This CL was motivated by hearing of a beginner being confused trying to contribute to an existing project, because they were trying to "go run" an individual file, which was failing with a wall of error because of all the missing symbols from the other files in the package. Change-Id: Iec0ef73df1c5ada2299d059dd468dc2095c367a8 Reviewed-on: https://go-review.googlesource.com/c/website/+/283635 Trust: Filippo Valsorda <filippo@golang.org> Reviewed-by: Steve Traut <straut@google.com>
- Loading branch information