From: Ian Lance Taylor Date: Fri, 19 Feb 2016 19:42:34 +0000 (-0800) Subject: cmd/api: fix benchmark to ignore internal packages X-Git-Tag: go1.7beta1~1821 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0d5e6a3f07414ecf6a14bc601532aa305296f562;p=gostls13.git cmd/api: fix benchmark to ignore internal packages Change-Id: I8ee46287ae0744efa83ad343997ad6835520fa5c Reviewed-on: https://go-review.googlesource.com/19688 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/api/goapi_test.go b/src/cmd/api/goapi_test.go index 1d2cc9ac82..a3fe0efedc 100644 --- a/src/cmd/api/goapi_test.go +++ b/src/cmd/api/goapi_test.go @@ -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) }