From 560718e97633ab766a115ebb4e68f985b423b6ea Mon Sep 17 00:00:00 2001 From: Felix Hanley Date: Tue, 23 Oct 2018 10:28:58 +1100 Subject: [PATCH] Use stdlib context in generated Go files (#4904) --- grpc/src/compiler/go_generator.cc | 2 +- grpc/tests/go_test.go | 2 +- tests/MyGame/Example/MonsterStorage_grpc.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grpc/src/compiler/go_generator.cc b/grpc/src/compiler/go_generator.cc index d620089af..604828d60 100644 --- a/grpc/src/compiler/go_generator.cc +++ b/grpc/src/compiler/go_generator.cc @@ -84,7 +84,7 @@ void GenerateImports(grpc_generator::File *file, grpc_generator::Printer *printe } printer->Print("import (\n"); printer->Indent(); - printer->Print(vars, "$context$ \"golang.org/x/net/context\"\n"); + printer->Print(vars, "$context$ \"context\"\n"); printer->Print(vars, "$grpc$ \"google.golang.org/grpc\"\n"); printer->Outdent(); printer->Print(")\n\n"); diff --git a/grpc/tests/go_test.go b/grpc/tests/go_test.go index 7192f9720..288036bcb 100644 --- a/grpc/tests/go_test.go +++ b/grpc/tests/go_test.go @@ -3,10 +3,10 @@ package testing import ( "../../tests/MyGame/Example" + "context" "net" "testing" - "golang.org/x/net/context" "google.golang.org/grpc" ) diff --git a/tests/MyGame/Example/MonsterStorage_grpc.go b/tests/MyGame/Example/MonsterStorage_grpc.go index 69bfe543a..2e3423712 100644 --- a/tests/MyGame/Example/MonsterStorage_grpc.go +++ b/tests/MyGame/Example/MonsterStorage_grpc.go @@ -7,7 +7,7 @@ package Example import "github.com/google/flatbuffers/go" import ( - context "golang.org/x/net/context" + context "context" grpc "google.golang.org/grpc" )