]> Cypherpunks.ru repositories - gostls13.git/commitdiff
context: avoid importing context package twice
authorKevin Burke <kev@inburke.com>
Wed, 24 Feb 2021 17:12:34 +0000 (09:12 -0800)
committerKevin Burke <kev@inburke.com>
Wed, 24 Feb 2021 18:15:00 +0000 (18:15 +0000)
Change-Id: Id0a127e080dda8ee62738922c6de8caf3719dd68
Reviewed-on: https://go-review.googlesource.com/c/go/+/295949
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Trust: Kevin Burke <kev@inburke.com>
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/context/benchmark_test.go

index c4c72f00f8033ef2ee8a8592e79f69a169decaed..69d75fff1866baa06362994adbc1ddadc647e226 100644 (file)
@@ -5,7 +5,6 @@
 package context_test
 
 import (
-       "context"
        . "context"
        "fmt"
        "runtime"
@@ -141,7 +140,7 @@ func BenchmarkCheckCanceled(b *testing.B) {
 }
 
 func BenchmarkContextCancelDone(b *testing.B) {
-       ctx, cancel := context.WithCancel(context.Background())
+       ctx, cancel := WithCancel(Background())
        defer cancel()
 
        b.RunParallel(func(pb *testing.PB) {