From 961c04cae992eadb42d286d2f85f8a675bdc68c8 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 29 Jan 2018 14:17:40 -0800 Subject: Upgrading server dependancies (#8154) --- vendor/github.com/pkg/errors/bench_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vendor/github.com/pkg/errors/bench_test.go') diff --git a/vendor/github.com/pkg/errors/bench_test.go b/vendor/github.com/pkg/errors/bench_test.go index 903b5f2d4..0416a3cbb 100644 --- a/vendor/github.com/pkg/errors/bench_test.go +++ b/vendor/github.com/pkg/errors/bench_test.go @@ -15,7 +15,6 @@ func noErrors(at, depth int) error { } return noErrors(at+1, depth) } - func yesErrors(at, depth int) error { if at >= depth { return New("ye error") @@ -23,11 +22,8 @@ func yesErrors(at, depth int) error { return yesErrors(at+1, depth) } -// GlobalE is an exported global to store the result of benchmark results, -// preventing the compiler from optimising the benchmark functions away. -var GlobalE error - func BenchmarkErrors(b *testing.B) { + var toperr error type run struct { stack int std bool @@ -57,7 +53,7 @@ func BenchmarkErrors(b *testing.B) { err = f(0, r.stack) } b.StopTimer() - GlobalE = err + toperr = err }) } } -- cgit v1.2.3-1-g7c22