mirror of
https://github.com/golang/go
synced 2024-09-30 18:08:33 -06:00
The Go programming language
7c26c99973
When goimports was run on a file like: package main import ( "example.net/foo" "example.net/bar" ) var _, _ = foo.Foo, bar.Bar ... even though there looks to be no work to do, it still needs to verify that "example.net/foo" is really package "foo" (even though it looks like it) and "example.net/bar" is really package "bar". (Packages in the standard library are hard-coded since the previous commit and not verified for consistency since they're always consistent) To do that verification for non-std packages, go/build.Import was being used before, but Import reads all files in the directory to make sure they're consistent. That's unnecessary. Instead, stop after the first file. If example.net/foo has foo.go with "package foo" and just_kidding.go with "package other", we never read that far to find the inconsistency. Oh well. Prefer speed. Updates golang/go#16367 Change-Id: I9fc3fefbee0e8a6bc287bf2a565257fb9523fd5c Reviewed-on: https://go-review.googlesource.com/24948 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> |
||
---|---|---|
benchmark/parse | ||
blog | ||
cmd | ||
container/intsets | ||
cover | ||
go | ||
godoc | ||
imports | ||
oracle | ||
playground | ||
present | ||
refactor | ||
.gitattributes | ||
.gitignore | ||
AUTHORS | ||
codereview.cfg | ||
CONTRIBUTING.md | ||
CONTRIBUTORS | ||
LICENSE | ||
PATENTS | ||
README |
This subrepository holds the source for various packages and tools that support the Go programming language. Some of the tools, godoc and vet for example, are included in binary Go distributions. Others, including the Go oracle and the test coverage tool, can be fetched with "go get". Packages include a type-checker for Go and an implementation of the Static Single Assignment form (SSA) representation for Go programs. To submit changes to this repository, see http://golang.org/doc/contribute.html.