mirror of
https://github.com/golang/go
synced 2024-11-08 01:46:14 -07:00
context: avoid importing context package twice
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>
This commit is contained in:
parent
dc4698f52b
commit
c9d9b40b13
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user