From: Rob Pike Date: Tue, 13 Aug 2013 01:32:32 +0000 (+1000) Subject: go/build: change the wording of NoGoError and comment it better X-Git-Tag: go1.2rc2~645 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=954d14741d56c271a95d7b4dee1e8da35d7347af;p=gostls13.git go/build: change the wording of NoGoError and comment it better Out of context, it can be very confusing because there can be lots of Go files in the directory, but the error message says there aren't. R=golang-dev, dsymonds, rsc CC=golang-dev https://golang.org/cl/12823043 --- diff --git a/src/pkg/go/build/build.go b/src/pkg/go/build/build.go index 563e7fe21b..ecea22456e 100644 --- a/src/pkg/go/build/build.go +++ b/src/pkg/go/build/build.go @@ -395,13 +395,14 @@ func (ctxt *Context) ImportDir(dir string, mode ImportMode) (*Package, error) { } // NoGoError is the error used by Import to describe a directory -// containing no Go source files. +// containing no buildable Go source files. (It may still contain +// test files, files hidden by build tags, and so on.) type NoGoError struct { Dir string } func (e *NoGoError) Error() string { - return "no Go source files in " + e.Dir + return "no buildable Go source files in " + e.Dir } // Import returns details about the Go package named by the import path,