Skip to content

Commit

Permalink
Switch to stdlib context package (go1.8+)
Browse files Browse the repository at this point in the history
  • Loading branch information
eticzon committed Apr 23, 2017
1 parent 00cf81d commit 670cd72
Show file tree
Hide file tree
Showing 125 changed files with 125 additions and 246 deletions.
3 changes: 1 addition & 2 deletions bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ package elastic

import (
"bytes"
"context"
"errors"
"fmt"
"net/url"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions bulk_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
package elastic

import (
"context"
"sync"
"sync/atomic"
"time"

"golang.org/x/net/context"
)

// BulkProcessorService allows to easily process bulk requests. It allows setting
Expand Down
3 changes: 1 addition & 2 deletions bulk_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
package elastic

import (
"context"
"fmt"
"math/rand"
"sync/atomic"
"testing"
"time"

"golang.org/x/net/context"
)

func TestBulkProcessorDefaults(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions bulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
"encoding/json"
"testing"

"golang.org/x/net/context"
)

func TestBulk(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions clear_scroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
"fmt"
"net/url"

"golang.org/x/net/context"
)

// ClearScrollService clears one or more scroll contexts by their ids.
Expand Down
3 changes: 1 addition & 2 deletions clear_scroll_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
_ "net/http"
"testing"

"golang.org/x/net/context"
)

func TestClearScroll(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package elastic

import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
Expand All @@ -17,7 +18,6 @@ import (
"sync"
"time"

"golang.org/x/net/context"
"golang.org/x/net/context/ctxhttp"
)

Expand Down
3 changes: 1 addition & 2 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package elastic

import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
Expand All @@ -15,8 +16,6 @@ import (
"strings"
"testing"
"time"

"golang.org/x/net/context"
)

func findConn(s string, slice ...*conn) (int, bool) {
Expand Down
3 changes: 1 addition & 2 deletions cluster-test/cluster-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package main

import (
"context"
"encoding/json"
"errors"
"flag"
Expand All @@ -17,8 +18,6 @@ import (
"sync/atomic"
"time"

"golang.org/x/net/context"

elastic "gopkg.in/olivere/elastic.v5"
)

Expand Down
3 changes: 1 addition & 2 deletions cluster_health.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions cluster_health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
"net/url"
"testing"

"golang.org/x/net/context"
)

func TestClusterHealth(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions cluster_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions cluster_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
"net/url"
"testing"

"golang.org/x/net/context"
)

func TestClusterState(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions cluster_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions cluster_stats_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
package elastic

import (
"context"
"net/url"
"testing"

"golang.org/x/net/context"
)

func TestClusterStats(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions count.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions count_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestCountURL(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package elastic

import (
"bytes"
"context"
"encoding/json"
"sync/atomic"
"testing"

"golang.org/x/net/context"
)

type decoder struct {
Expand Down
3 changes: 1 addition & 2 deletions delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
package elastic

import (
"context"
"fmt"
"net/url"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions delete_by_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions delete_by_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestDeleteByQueryBuildURL(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions delete_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
package elastic

import (
"context"
"fmt"
"net/url"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions delete_template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestDeleteTemplateValidate(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestDelete(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
package elastic_test

import (
"context"
"encoding/json"
"fmt"
"log"
"os"
"reflect"
"time"

"golang.org/x/net/context"

elastic "gopkg.in/olivere/elastic.v5"
)

Expand Down
3 changes: 1 addition & 2 deletions exists.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/http"
"net/url"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions exists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestExists(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
package elastic

import (
"context"
"fmt"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
3 changes: 1 addition & 2 deletions explain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
package elastic

import (
"context"
"testing"

"golang.org/x/net/context"
)

func TestExplain(t *testing.T) {
Expand Down
3 changes: 1 addition & 2 deletions field_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
package elastic

import (
"context"
"fmt"
"net/http"
"net/url"
"strings"

"golang.org/x/net/context"

"gopkg.in/olivere/elastic.v5/uritemplates"
)

Expand Down
Loading

0 comments on commit 670cd72

Please sign in to comment.