For the default build.Context, the Package.Goroot flag indicates when a package was loaded from the standard library. Until now, the loader used it to enable the typechecker's intrinsics for the "unsafe" package. This seemed like a good check, but it is troublesome for clients that use a nonstandard build.Context. For example, if a client defines nonstandard Context hooks that load all packages, whether standard or user-defined, from a flat sstable, there is no way for those hooks to indicate which packages should have this flag set and which not. As a result the contents of the "unsafe" package directory are treated as Go source code when they are merely documentation. Change-Id: Iea0a7cc9877507d73606391293971a28279c4e4b Reviewed-on: https://go-review.googlesource.com/19188 Reviewed-by: Robert Griesemer <gri@golang.org> |
||
---|---|---|
.. | ||
testdata | ||
cgo.go | ||
cgo14.go | ||
doc.go | ||
example14_test.go | ||
example15_test.go | ||
example_test.go | ||
go16.go | ||
go16_test.go | ||
loader.go | ||
loader14.go | ||
loader14_test.go | ||
loader_test.go | ||
stdlib14_test.go | ||
stdlib_test.go | ||
util.go |