From 908c439317d9c8831562fcd34e41a7f6b1fd2d85 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 3 Mar 2017 16:01:06 -0600 Subject: [PATCH] Use stdlib context --- .travis.yml | 1 - conn.go | 3 +-- conn_pool.go | 2 +- conn_test.go | 2 +- query.go | 3 +-- query_test.go | 4 +--- stress_test.go | 3 +-- 7 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index dc3263f4..e3d94acd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,6 @@ install: - go get -u github.com/shopspring/decimal - go get -u gopkg.in/inconshreveable/log15.v2 - go get -u github.com/jackc/fake - - go get -u golang.org/x/net/context - go get -u github.com/jackc/pgmock/pgmsg script: diff --git a/conn.go b/conn.go index 09dada10..1c0b4e22 100644 --- a/conn.go +++ b/conn.go @@ -1,6 +1,7 @@ package pgx import ( + "context" "crypto/md5" "crypto/tls" "encoding/binary" @@ -19,8 +20,6 @@ import ( "sync/atomic" "time" - "golang.org/x/net/context" - "github.com/jackc/pgx/chunkreader" "github.com/jackc/pgx/pgtype" ) diff --git a/conn_pool.go b/conn_pool.go index 9701f170..9dfbf734 100644 --- a/conn_pool.go +++ b/conn_pool.go @@ -1,8 +1,8 @@ package pgx import ( + "context" "errors" - "golang.org/x/net/context" "sync" "time" ) diff --git a/conn_test.go b/conn_test.go index cc87efa8..b44fd6db 100644 --- a/conn_test.go +++ b/conn_test.go @@ -1,9 +1,9 @@ package pgx_test import ( + "context" "crypto/tls" "fmt" - "golang.org/x/net/context" "net" "os" "reflect" diff --git a/query.go b/query.go index 4af1de10..80e7c47c 100644 --- a/query.go +++ b/query.go @@ -1,13 +1,12 @@ package pgx import ( + "context" "database/sql" "errors" "fmt" "time" - "golang.org/x/net/context" - "github.com/jackc/pgx/pgtype" ) diff --git a/query_test.go b/query_test.go index fd5d2e5b..c30ab2ef 100644 --- a/query_test.go +++ b/query_test.go @@ -2,16 +2,14 @@ package pgx_test import ( "bytes" + "context" "database/sql" "fmt" "strings" "testing" "time" - "golang.org/x/net/context" - "github.com/jackc/pgx" - "github.com/shopspring/decimal" ) diff --git a/stress_test.go b/stress_test.go index 814c8023..47a3f4d6 100644 --- a/stress_test.go +++ b/stress_test.go @@ -1,6 +1,7 @@ package pgx_test import ( + "context" "errors" "fmt" "math/rand" @@ -9,8 +10,6 @@ import ( "testing" "time" - "golang.org/x/net/context" - "github.com/jackc/fake" "github.com/jackc/pgx" )