From 05ae90f578d035c1348756621569ec7dff98f050 Mon Sep 17 00:00:00 2001 From: Naser Mirzaei Date: Thu, 10 Dec 2020 02:09:49 +0330 Subject: [PATCH 1/2] use stdlib context Signed-off-by: Naser Mirzaei --- examples/starwars/schema.go | 2 +- mutation.go | 3 ++- mutation_test.go | 2 +- node.go | 5 +++-- node_global_test.go | 2 +- node_test.go | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/starwars/schema.go b/examples/starwars/schema.go index ac492af..00f31cd 100644 --- a/examples/starwars/schema.go +++ b/examples/starwars/schema.go @@ -1,11 +1,11 @@ package starwars import ( + "context" "errors" "github.com/graphql-go/graphql" "github.com/graphql-go/relay" - "golang.org/x/net/context" ) /** diff --git a/mutation.go b/mutation.go index 8ef67c3..2b59186 100644 --- a/mutation.go +++ b/mutation.go @@ -1,8 +1,9 @@ package relay import ( + "context" + "github.com/graphql-go/graphql" - "golang.org/x/net/context" ) type MutationFn func(inputMap map[string]interface{}, info graphql.ResolveInfo, ctx context.Context) (map[string]interface{}, error) diff --git a/mutation_test.go b/mutation_test.go index 2d8dd0d..6a77d5e 100644 --- a/mutation_test.go +++ b/mutation_test.go @@ -1,6 +1,7 @@ package relay_test import ( + "context" "errors" "reflect" "testing" @@ -11,7 +12,6 @@ import ( "github.com/graphql-go/graphql/language/location" "github.com/graphql-go/graphql/testutil" "github.com/graphql-go/relay" - "golang.org/x/net/context" ) func testAsyncDataMutation(resultChan *chan int) { diff --git a/node.go b/node.go index 4248950..40c4cfd 100644 --- a/node.go +++ b/node.go @@ -1,12 +1,13 @@ package relay import ( + "context" "encoding/base64" "encoding/json" "fmt" - "github.com/graphql-go/graphql" - "golang.org/x/net/context" "strings" + + "github.com/graphql-go/graphql" ) type NodeDefinitions struct { diff --git a/node_global_test.go b/node_global_test.go index d100c24..ea0fa82 100644 --- a/node_global_test.go +++ b/node_global_test.go @@ -1,6 +1,7 @@ package relay_test import ( + "context" "errors" "fmt" "reflect" @@ -9,7 +10,6 @@ import ( "github.com/graphql-go/graphql" "github.com/graphql-go/graphql/testutil" "github.com/graphql-go/relay" - "golang.org/x/net/context" ) type photo2 struct { diff --git a/node_test.go b/node_test.go index a9e68e8..cad5423 100644 --- a/node_test.go +++ b/node_test.go @@ -1,6 +1,7 @@ package relay_test import ( + "context" "errors" "fmt" "reflect" @@ -11,7 +12,6 @@ import ( "github.com/graphql-go/graphql/language/location" "github.com/graphql-go/graphql/testutil" "github.com/graphql-go/relay" - "golang.org/x/net/context" ) type user struct { From c27646fb1419e2995a4a877dd6598f8713db4da6 Mon Sep 17 00:00:00 2001 From: Naser Mirzaei Date: Thu, 10 Dec 2020 02:14:02 +0330 Subject: [PATCH 2/2] upgrade golang version to 1.7 Signed-off-by: Naser Mirzaei --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8e979e0..606ff5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: go go: - - 1.4 + - 1.7 before_install: - go get github.com/axw/gocov/gocov