瀏覽代碼

rate: use standard library context package

Fixes golang/go#16745

Change-Id: I34f87a2ae570c2bb0ce9ccb72fc5be0d34266e49
Reviewed-on: https://go-review.googlesource.com/41194
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dan Peterson <dpiddy@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Brad Fitzpatrick 8 年之前
父節點
當前提交
c06e80d930
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 2
      rate/rate.go
  2. 1 2
      rate/rate_test.go

+ 1 - 2
rate/rate.go

@@ -6,12 +6,11 @@
 package rate
 
 import (
+	"context"
 	"fmt"
 	"math"
 	"sync"
 	"time"
-
-	"golang.org/x/net/context"
 )
 
 // Limit defines the maximum frequency of some events.

+ 1 - 2
rate/rate_test.go

@@ -5,14 +5,13 @@
 package rate
 
 import (
+	"context"
 	"math"
 	"runtime"
 	"sync"
 	"sync/atomic"
 	"testing"
 	"time"
-
-	"golang.org/x/net/context"
 )
 
 func TestLimit(t *testing.T) {