1
0
mirror of https://github.com/golang/go synced 2024-11-24 18:40:14 -07:00

cmd/api: fix benchmark to ignore internal packages

Change-Id: I8ee46287ae0744efa83ad343997ad6835520fa5c
Reviewed-on: https://go-review.googlesource.com/19688
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2016-02-19 11:42:34 -08:00
parent 5a9c128a03
commit 0d5e6a3f07

View File

@ -178,7 +178,7 @@ func BenchmarkAll(b *testing.B) {
for _, context := range contexts {
w := NewWalker(context, filepath.Join(build.Default.GOROOT, "src"))
for _, name := range pkgNames {
if name != "unsafe" && !strings.HasPrefix(name, "cmd/") {
if name != "unsafe" && !strings.HasPrefix(name, "cmd/") && !internalPkg.MatchString(name) {
pkg, _ := w.Import(name)
w.export(pkg)
}