From c74e08f039e56cef576e4336382b2a2d12d9e026 Mon Sep 17 00:00:00 2001 From: Marty Schoch Date: Tue, 27 Feb 2018 11:33:12 -0800 Subject: [PATCH] BREAKING API CHANGE - use stdlib context pkg update all references to context to use std lib pkg --- index.go | 3 ++- index_alias_impl.go | 3 +-- index_alias_impl_test.go | 3 +-- index_impl.go | 3 +-- index_test.go | 3 +-- search/collector.go | 3 +-- search/collector/bench_test.go | 2 +- search/collector/topn.go | 2 +- search/collector/topn_test.go | 3 +-- vendor/manifest | 9 --------- 10 files changed, 10 insertions(+), 24 deletions(-) diff --git a/index.go b/index.go index e85652d9..ea7b3832 100644 --- a/index.go +++ b/index.go @@ -15,11 +15,12 @@ package bleve import ( + "context" + "github.com/blevesearch/bleve/document" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/index/store" "github.com/blevesearch/bleve/mapping" - "golang.org/x/net/context" ) // A Batch groups together multiple Index and Delete diff --git a/index_alias_impl.go b/index_alias_impl.go index 9e9a3594..f678a059 100644 --- a/index_alias_impl.go +++ b/index_alias_impl.go @@ -15,12 +15,11 @@ package bleve import ( + "context" "sort" "sync" "time" - "golang.org/x/net/context" - "github.com/blevesearch/bleve/document" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/index/store" diff --git a/index_alias_impl_test.go b/index_alias_impl_test.go index a5940664..2ee64991 100644 --- a/index_alias_impl_test.go +++ b/index_alias_impl_test.go @@ -15,13 +15,12 @@ package bleve import ( + "context" "fmt" "reflect" "testing" "time" - "golang.org/x/net/context" - "github.com/blevesearch/bleve/document" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/index/store" diff --git a/index_impl.go b/index_impl.go index 799b582a..caea1b8e 100644 --- a/index_impl.go +++ b/index_impl.go @@ -15,6 +15,7 @@ package bleve import ( + "context" "encoding/json" "fmt" "os" @@ -22,8 +23,6 @@ import ( "sync/atomic" "time" - "golang.org/x/net/context" - "github.com/blevesearch/bleve/document" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/index/store" diff --git a/index_test.go b/index_test.go index 762e3838..f16a8f63 100644 --- a/index_test.go +++ b/index_test.go @@ -15,6 +15,7 @@ package bleve import ( + "context" "fmt" "io/ioutil" "log" @@ -28,8 +29,6 @@ import ( "testing" "time" - "golang.org/x/net/context" - "github.com/blevesearch/bleve/analysis/analyzer/keyword" "github.com/blevesearch/bleve/document" "github.com/blevesearch/bleve/index" diff --git a/search/collector.go b/search/collector.go index cba4829d..0d163a9d 100644 --- a/search/collector.go +++ b/search/collector.go @@ -15,11 +15,10 @@ package search import ( + "context" "time" "github.com/blevesearch/bleve/index" - - "golang.org/x/net/context" ) type Collector interface { diff --git a/search/collector/bench_test.go b/search/collector/bench_test.go index e75613c3..e6a786f4 100644 --- a/search/collector/bench_test.go +++ b/search/collector/bench_test.go @@ -15,13 +15,13 @@ package collector import ( + "context" "math/rand" "strconv" "testing" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/search" - "golang.org/x/net/context" ) type createCollector func() search.Collector diff --git a/search/collector/topn.go b/search/collector/topn.go index 2c7c6752..388370e7 100644 --- a/search/collector/topn.go +++ b/search/collector/topn.go @@ -15,11 +15,11 @@ package collector import ( + "context" "time" "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/search" - "golang.org/x/net/context" ) type collectorStore interface { diff --git a/search/collector/topn_test.go b/search/collector/topn_test.go index b8c331ae..d50e38a0 100644 --- a/search/collector/topn_test.go +++ b/search/collector/topn_test.go @@ -15,10 +15,9 @@ package collector import ( + "context" "testing" - "golang.org/x/net/context" - "github.com/blevesearch/bleve/index" "github.com/blevesearch/bleve/search" ) diff --git a/vendor/manifest b/vendor/manifest index 9a86629e..0837684f 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -107,15 +107,6 @@ "branch": "master", "notests": true }, - { - "importpath": "golang.org/x/net/context", - "repository": "https://go.googlesource.com/net", - "vcs": "", - "revision": "e45385e9b226f570b1f086bf287b25d3d4117776", - "branch": "master", - "path": "/context", - "notests": true - }, { "importpath": "golang.org/x/text/transform", "repository": "https://go.googlesource.com/text",