Browse Source

Replace golang.org/x/net/context with stdlib context (#887)

Jacob H. Haven 8 years ago
parent
commit
79434f238f
6 changed files with 7 additions and 13 deletions
  1. 1 2
      cassandra_test.go
  2. 1 2
      conn.go
  3. 1 2
      conn_test.go
  4. 2 4
      control.go
  5. 1 2
      session.go
  6. 1 1
      session_connect_test.go

+ 1 - 2
cassandra_test.go

@@ -4,6 +4,7 @@ package gocql
 
 import (
 	"bytes"
+	"context"
 	"io"
 	"math"
 	"math/big"
@@ -16,8 +17,6 @@ import (
 	"time"
 	"unicode"
 
-	"golang.org/x/net/context"
-
 	"gopkg.in/inf.v0"
 )
 

+ 1 - 2
conn.go

@@ -6,6 +6,7 @@ package gocql
 
 import (
 	"bufio"
+	"context"
 	"crypto/tls"
 	"errors"
 	"fmt"
@@ -18,8 +19,6 @@ import (
 	"sync/atomic"
 	"time"
 
-	"golang.org/x/net/context"
-
 	"github.com/gocql/gocql/internal/lru"
 
 	"github.com/gocql/gocql/internal/streams"

+ 1 - 2
conn_test.go

@@ -6,6 +6,7 @@
 package gocql
 
 import (
+	"context"
 	"crypto/tls"
 	"crypto/x509"
 	"fmt"
@@ -17,8 +18,6 @@ import (
 	"sync/atomic"
 	"testing"
 	"time"
-
-	"golang.org/x/net/context"
 )
 
 const (

+ 2 - 4
control.go

@@ -1,6 +1,7 @@
 package gocql
 
 import (
+	"context"
 	crand "crypto/rand"
 	"errors"
 	"fmt"
@@ -8,12 +9,9 @@ import (
 	"net"
 	"regexp"
 	"strconv"
+	"sync"
 	"sync/atomic"
 	"time"
-
-	"sync"
-
-	"golang.org/x/net/context"
 )
 
 var (

+ 1 - 2
session.go

@@ -6,6 +6,7 @@ package gocql
 
 import (
 	"bytes"
+	"context"
 	"encoding/binary"
 	"errors"
 	"fmt"
@@ -17,8 +18,6 @@ import (
 	"time"
 	"unicode"
 
-	"golang.org/x/net/context"
-
 	"github.com/gocql/gocql/internal/lru"
 )
 

+ 1 - 1
session_connect_test.go

@@ -1,7 +1,7 @@
 package gocql
 
 import (
-	"golang.org/x/net/context"
+	"context"
 	"net"
 	"strconv"
 	"sync"