Commit 954d1474 authored by Rob Pike's avatar Rob Pike

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
parent 83348a13
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment