diff --git a/compiler/cpp/src/thrift/generate/t_go_generator.cc b/compiler/cpp/src/thrift/generate/t_go_generator.cc
index a82ce72..bac1c57 100644
--- a/compiler/cpp/src/thrift/generate/t_go_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_go_generator.cc
@@ -261,8 +261,7 @@
   std::string function_signature(t_function* tfunction, std::string prefix = "");
   std::string function_signature_if(t_function* tfunction,
                                     std::string prefix = "",
-                                    bool addError = false,
-                                    bool enableContext = false);
+                                    bool addError = false);
   std::string argument_list(t_struct* tstruct);
   std::string type_to_enum(t_type* ttype);
   std::string type_to_go_type(t_type* ttype);
@@ -1838,7 +1837,7 @@
 
     for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
       generate_go_docstring(f_types_, (*f_iter));
-      f_types_ << indent() << function_signature_if(*f_iter, "", true, true) << endl;
+      f_types_ << indent() << function_signature_if(*f_iter, "", true) << endl;
     }
   }
 
@@ -1952,7 +1951,7 @@
     // Open function
     generate_go_docstring(f_types_, (*f_iter));
     f_types_ << indent() << "func (p *" << serviceName << "Client) "
-               << function_signature_if(*f_iter, "", true, false) << " {" << endl;
+               << function_signature_if(*f_iter, "", true) << " {" << endl;
     indent_up();
     /*
     f_types_ <<
@@ -2160,9 +2159,15 @@
 
   string unused_protection;
 
+  string ctxPackage = "context";
+  if (legacy_context_) {
+    ctxPackage = "golang.org/x/net/context";
+  }
+
   f_remote << go_autogen_comment();
   f_remote << indent() << "package main" << endl << endl;
   f_remote << indent() << "import (" << endl;
+  f_remote << indent() << "        \"" << ctxPackage << "\"" << endl;
   f_remote << indent() << "        \"flag\"" << endl;
   f_remote << indent() << "        \"fmt\"" << endl;
   f_remote << indent() << "        \"math\"" << endl;
@@ -2502,9 +2507,11 @@
     f_remote << indent() << "fmt.Print(client." << pubName << "(";
     bool argFirst = true;
 
+    f_remote << "context.Background()";
     for (std::vector<t_field*>::size_type i = 0; i < num_args; ++i) {
       if (argFirst) {
         argFirst = false;
+        f_remote << ", ";
       } else {
         f_remote << ", ";
       }
@@ -3434,15 +3441,12 @@
  * Renders an interface function signature of the form 'type name(args)'
  *
  * @param tfunction Function definition
- * @param enableContext Client doesn't suppport context for now.
  * @return String of rendered function definition
  */
-string t_go_generator::function_signature_if(t_function* tfunction, string prefix, bool addError, bool enableContext) {
+string t_go_generator::function_signature_if(t_function* tfunction, string prefix, bool addError) {
   // TODO(mcslee): Nitpicky, no ',' if argument_list is empty
   string signature = publicize(prefix + tfunction->get_name()) + "(";
-  if (enableContext) {
-    signature += "ctx context.Context, ";
-  }
+  signature += "ctx context.Context, ";
   signature += argument_list(tfunction->get_arglist()) + ") (";
   t_type* ret = tfunction->get_returntype();
   t_struct* exceptions = tfunction->get_xceptions();
diff --git a/configure.ac b/configure.ac
index 0c628da..bb036f0 100755
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@
   if [[ -x "$GO" ]] ; then
     AS_IF([test -n "$GO"],[
       ax_go_version="1.4"
+      ax_go17_version="1.7"
 
       AC_MSG_CHECKING([for Go version])
       golang_version=`$GO version 2>&1 | $SED -e 's/\(go \)\(version \)\(go\)\(@<:@0-9@:>@.@<:@0-9@:>@.@<:@0-9@:>@\)\(@<:@\*@:>@*\).*/\4/'`
@@ -410,6 +411,13 @@
       :
         have_go="no"
       ])
+      AX_COMPARE_VERSION([$golang_version],[lt],[$ax_go17_version],[
+      :
+        go_version_lt_17="yes"
+      ],[
+      :
+        go_version_lt_17="no"
+      ])
     ],[
       AC_MSG_WARN([could not find Go ])
       have_go="no"
@@ -417,6 +425,7 @@
   fi
 fi
 AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])
+AM_CONDITIONAL([GOVERSION_LT_17], [test "$go_version_lt_17" = "yes"])
 
 AX_THRIFT_LIB(rs, [Rust], yes)
 have_rs="no"
diff --git a/lib/go/test/Makefile.am b/lib/go/test/Makefile.am
index 35a5457..a3bc9e0 100644
--- a/lib/go/test/Makefile.am
+++ b/lib/go/test/Makefile.am
@@ -17,8 +17,12 @@
 # under the License.
 #
 
+if GOVERSION_LT_17
+COMPILER_EXTRAFLAG=",legacy_context"
+endif
+
 THRIFT = $(top_builddir)/compiler/cpp/thrift
-THRIFTARGS = -out gopath/src/ --gen go:thrift_import=thrift,legacy_context
+THRIFTARGS = -out gopath/src/ --gen go:thrift_import=thrift$(COMPILER_EXTRAFLAG)
 THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
 
 # Thrift for GO has problems with complex map keys: THRIFT-2063
diff --git a/lib/go/test/tests/client_error_test.go b/lib/go/test/tests/client_error_test.go
index 0810be6..ad43447 100644
--- a/lib/go/test/tests/client_error_test.go
+++ b/lib/go/test/tests/client_error_test.go
@@ -412,7 +412,7 @@
 			return
 		}
 		client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-		_, retErr := client.TestStruct(thing)
+		_, retErr := client.TestStruct(defaultCtx, thing)
 		mockCtrl.Finish()
 		err2, ok := retErr.(thrift.TTransportException)
 		if !ok {
@@ -444,7 +444,7 @@
 			return
 		}
 		client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-		_, retErr := client.TestStruct(thing)
+		_, retErr := client.TestStruct(defaultCtx, thing)
 		mockCtrl.Finish()
 		err2, ok := retErr.(thrift.TProtocolException)
 		if !ok {
@@ -565,7 +565,7 @@
 		willComplete := !prepareClientCallException(protocol, i, err)
 
 		client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-		_, retErr := client.TestString("test")
+		_, retErr := client.TestString(defaultCtx, "test")
 		mockCtrl.Finish()
 
 		if !willComplete {
@@ -608,7 +608,7 @@
 	)
 
 	client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-	_, err := client.TestString("test")
+	_, err := client.TestString(defaultCtx, "test")
 	mockCtrl.Finish()
 	appErr, ok := err.(thrift.TApplicationException)
 	if !ok {
@@ -638,7 +638,7 @@
 	)
 
 	client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-	_, err := client.TestString("test")
+	_, err := client.TestString(defaultCtx, "test")
 	mockCtrl.Finish()
 	appErr, ok := err.(thrift.TApplicationException)
 	if !ok {
@@ -668,7 +668,7 @@
 	)
 
 	client := errortest.NewErrorTestClientProtocol(transport, protocol, protocol)
-	_, err := client.TestString("test")
+	_, err := client.TestString(defaultCtx, "test")
 	mockCtrl.Finish()
 	appErr, ok := err.(thrift.TApplicationException)
 	if !ok {
diff --git a/lib/go/test/tests/multiplexed_protocol_test.go b/lib/go/test/tests/multiplexed_protocol_test.go
index ccf7b30..27802e5 100644
--- a/lib/go/test/tests/multiplexed_protocol_test.go
+++ b/lib/go/test/tests/multiplexed_protocol_test.go
@@ -103,7 +103,7 @@
 }
 
 func TestCallFirst(t *testing.T) {
-	ret, err := firstClient.ReturnOne()
+	ret, err := firstClient.ReturnOne(defaultCtx)
 	if err != nil {
 		t.Fatal("Unable to call first server:", err)
 	}
@@ -113,7 +113,7 @@
 }
 
 func TestCallSecond(t *testing.T) {
-	ret, err := secondClient.ReturnTwo()
+	ret, err := secondClient.ReturnTwo(defaultCtx)
 	if err != nil {
 		t.Fatal("Unable to call second server:", err)
 	}
@@ -124,7 +124,7 @@
 
 func TestCallLegacy(t *testing.T) {
 	legacyClient := createLegacyClient(t)
-	ret, err := legacyClient.ReturnTwo()
+	ret, err := legacyClient.ReturnTwo(defaultCtx)
 	//expect error since default processor is not registered
 	if err == nil {
 		t.Fatal("Expecting error")
@@ -132,7 +132,7 @@
 	//register default processor and call again
 	processor.RegisterDefault(multiplexedprotocoltest.NewSecondProcessor(&SecondImpl{}))
 	legacyClient = createLegacyClient(t)
-	ret, err = legacyClient.ReturnTwo()
+	ret, err = legacyClient.ReturnTwo(defaultCtx)
 	if err != nil {
 		t.Fatal("Unable to call legacy server:", err)
 	}
diff --git a/lib/go/test/tests/one_way_test.go b/lib/go/test/tests/one_way_test.go
index d7519a2..32881e2 100644
--- a/lib/go/test/tests/one_way_test.go
+++ b/lib/go/test/tests/one_way_test.go
@@ -68,12 +68,12 @@
 
 func TestCallOnewayServer(t *testing.T) {
 	//call oneway function
-	err := client.Hi(1, "")
+	err := client.Hi(defaultCtx, 1, "")
 	if err != nil {
 		t.Fatal("Unexpected error: ", err)
 	}
 	//There is no way to detect protocol problems with single oneway call so we call it second time
-	i, err := client.EchoInt(42)
+	i, err := client.EchoInt(defaultCtx, 42)
 	if err != nil {
 		t.Fatal("Unexpected error: ", err)
 	}
diff --git a/lib/go/test/tests/thrifttest_driver.go b/lib/go/test/tests/thrifttest_driver.go
index f8643ed..de54cbc 100644
--- a/lib/go/test/tests/thrifttest_driver.go
+++ b/lib/go/test/tests/thrifttest_driver.go
@@ -26,11 +26,11 @@
 )
 
 type ThriftTestDriver struct {
-	client *thrifttest.ThriftTestClient
+	client thrifttest.ThriftTest
 	t      *testing.T
 }
 
-func NewThriftTestDriver(t *testing.T, client *thrifttest.ThriftTestClient) *ThriftTestDriver {
+func NewThriftTestDriver(t *testing.T, client thrifttest.ThriftTest) *ThriftTestDriver {
 	return &ThriftTestDriver{client, t}
 }
 
@@ -38,15 +38,15 @@
 	client := p.client
 	t := p.t
 
-	if client.TestVoid() != nil {
+	if client.TestVoid(defaultCtx) != nil {
 		t.Fatal("TestVoid failed")
 	}
 
-	if r, err := client.TestString("Test"); r != "Test" || err != nil {
+	if r, err := client.TestString(defaultCtx, "Test"); r != "Test" || err != nil {
 		t.Fatal("TestString with simple text failed")
 	}
 
-	if r, err := client.TestString(""); r != "" || err != nil {
+	if r, err := client.TestString(defaultCtx, ""); r != "" || err != nil {
 		t.Fatal("TestString with empty text failed")
 	}
 
@@ -76,7 +76,7 @@
 		"Walon, Winaray, 吴语, isiXhosa, ייִדיש, Yorùbá, Zeêuws, 中文, " +
 		"Bân-lâm-gú, 粵語"
 
-	if r, err := client.TestString(stringTest); r != stringTest || err != nil {
+	if r, err := client.TestString(defaultCtx, stringTest); r != stringTest || err != nil {
 		t.Fatal("TestString with all languages failed")
 	}
 
@@ -86,44 +86,44 @@
 		" now-a-bunch-of-junk: !@#$%&()(&%$#{}{}<><><" +
 		" char-to-test-json-parsing: ]] \"]] \\\" }}}{ [[[ "
 
-	if r, err := client.TestString(specialCharacters); r != specialCharacters || err != nil {
+	if r, err := client.TestString(defaultCtx, specialCharacters); r != specialCharacters || err != nil {
 		t.Fatal("TestString with specialCharacters failed")
 	}
 
-	if r, err := client.TestByte(1); r != 1 || err != nil {
+	if r, err := client.TestByte(defaultCtx, 1); r != 1 || err != nil {
 		t.Fatal("TestByte(1) failed")
 	}
-	if r, err := client.TestByte(0); r != 0 || err != nil {
+	if r, err := client.TestByte(defaultCtx, 0); r != 0 || err != nil {
 		t.Fatal("TestByte(0) failed")
 	}
-	if r, err := client.TestByte(-1); r != -1 || err != nil {
+	if r, err := client.TestByte(defaultCtx, -1); r != -1 || err != nil {
 		t.Fatal("TestByte(-1) failed")
 	}
-	if r, err := client.TestByte(-127); r != -127 || err != nil {
+	if r, err := client.TestByte(defaultCtx, -127); r != -127 || err != nil {
 		t.Fatal("TestByte(-127) failed")
 	}
 
-	if r, err := client.TestI32(-1); r != -1 || err != nil {
+	if r, err := client.TestI32(defaultCtx, -1); r != -1 || err != nil {
 		t.Fatal("TestI32(-1) failed")
 	}
-	if r, err := client.TestI32(1); r != 1 || err != nil {
+	if r, err := client.TestI32(defaultCtx, 1); r != 1 || err != nil {
 		t.Fatal("TestI32(1) failed")
 	}
 
-	if r, err := client.TestI64(-5); r != -5 || err != nil {
+	if r, err := client.TestI64(defaultCtx, -5); r != -5 || err != nil {
 		t.Fatal("TestI64(-5) failed")
 	}
-	if r, err := client.TestI64(5); r != 5 || err != nil {
+	if r, err := client.TestI64(defaultCtx, 5); r != 5 || err != nil {
 		t.Fatal("TestI64(5) failed")
 	}
-	if r, err := client.TestI64(-34359738368); r != -34359738368 || err != nil {
+	if r, err := client.TestI64(defaultCtx, -34359738368); r != -34359738368 || err != nil {
 		t.Fatal("TestI64(-34359738368) failed")
 	}
 
-	if r, err := client.TestDouble(-5.2098523); r != -5.2098523 || err != nil {
+	if r, err := client.TestDouble(defaultCtx, -5.2098523); r != -5.2098523 || err != nil {
 		t.Fatal("TestDouble(-5.2098523) failed")
 	}
-	if r, err := client.TestDouble(-7.012052175215044); r != -7.012052175215044 || err != nil {
+	if r, err := client.TestDouble(defaultCtx, -7.012052175215044); r != -7.012052175215044 || err != nil {
 		t.Fatal("TestDouble(-7.012052175215044) failed")
 	}
 
@@ -134,7 +134,7 @@
 	out.ByteThing = 1
 	out.I32Thing = -3
 	out.I64Thing = 1000000
-	if r, err := client.TestStruct(out); !reflect.DeepEqual(r, out) || err != nil {
+	if r, err := client.TestStruct(defaultCtx, out); !reflect.DeepEqual(r, out) || err != nil {
 		t.Fatal("TestStruct failed")
 	}
 
@@ -142,7 +142,7 @@
 	out2.ByteThing = 1
 	out2.StructThing = out
 	out2.I32Thing = 5
-	if r, err := client.TestNest(out2); !reflect.DeepEqual(r, out2) || err != nil {
+	if r, err := client.TestNest(defaultCtx, out2); !reflect.DeepEqual(r, out2) || err != nil {
 		t.Fatal("TestNest failed")
 	}
 
@@ -150,7 +150,7 @@
 	for i := int32(0); i < 5; i++ {
 		mapout[i] = i - 10
 	}
-	if r, err := client.TestMap(mapout); !reflect.DeepEqual(r, mapout) || err != nil {
+	if r, err := client.TestMap(defaultCtx, mapout); !reflect.DeepEqual(r, mapout) || err != nil {
 		t.Fatal("TestMap failed")
 	}
 
@@ -158,25 +158,25 @@
 		"a": "123", "a b": "with spaces ", "same": "same", "0": "numeric key",
 		"longValue": stringTest, stringTest: "long key",
 	}
-	if r, err := client.TestStringMap(mapTestInput); !reflect.DeepEqual(r, mapTestInput) || err != nil {
+	if r, err := client.TestStringMap(defaultCtx, mapTestInput); !reflect.DeepEqual(r, mapTestInput) || err != nil {
 		t.Fatal("TestStringMap failed")
 	}
 
 	setTestInput := []int32{1, 2, 3}
-	if r, err := client.TestSet(setTestInput); !reflect.DeepEqual(r, setTestInput) || err != nil {
+	if r, err := client.TestSet(defaultCtx, setTestInput); !reflect.DeepEqual(r, setTestInput) || err != nil {
 		t.Fatal("TestSet failed")
 	}
 
 	listTest := []int32{1, 2, 3}
-	if r, err := client.TestList(listTest); !reflect.DeepEqual(r, listTest) || err != nil {
+	if r, err := client.TestList(defaultCtx, listTest); !reflect.DeepEqual(r, listTest) || err != nil {
 		t.Fatal("TestList failed")
 	}
 
-	if r, err := client.TestEnum(thrifttest.Numberz_ONE); r != thrifttest.Numberz_ONE || err != nil {
+	if r, err := client.TestEnum(defaultCtx, thrifttest.Numberz_ONE); r != thrifttest.Numberz_ONE || err != nil {
 		t.Fatal("TestEnum failed")
 	}
 
-	if r, err := client.TestTypedef(69); r != 69 || err != nil {
+	if r, err := client.TestTypedef(defaultCtx, 69); r != 69 || err != nil {
 		t.Fatal("TestTypedef failed")
 	}
 
@@ -184,7 +184,7 @@
 		4:  {1: 1, 2: 2, 3: 3, 4: 4},
 		-4: {-4: -4, -3: -3, -2: -2, -1: -1},
 	}
-	if r, err := client.TestMapMap(1); !reflect.DeepEqual(r, mapMapTest) || err != nil {
+	if r, err := client.TestMapMap(defaultCtx, 1); !reflect.DeepEqual(r, mapMapTest) || err != nil {
 		t.Fatal("TestMapMap failed")
 	}
 
@@ -212,25 +212,25 @@
 		1: {thrifttest.Numberz_TWO: crazy, thrifttest.Numberz_THREE: crazy},
 		2: {thrifttest.Numberz_SIX: crazyEmpty},
 	}
-	if r, err := client.TestInsanity(crazy); !reflect.DeepEqual(r, insanity) || err != nil {
+	if r, err := client.TestInsanity(defaultCtx, crazy); !reflect.DeepEqual(r, insanity) || err != nil {
 		t.Fatal("TestInsanity failed")
 	}
 
-	if err := client.TestException("TException"); err == nil {
+	if err := client.TestException(defaultCtx, "TException"); err == nil {
 		t.Fatal("TestException TException failed")
 	}
 
-	if err, ok := client.TestException("Xception").(*thrifttest.Xception); ok == false || err == nil {
+	if err, ok := client.TestException(defaultCtx, "Xception").(*thrifttest.Xception); ok == false || err == nil {
 		t.Fatal("TestException Xception failed")
 	} else if err.ErrorCode != 1001 || err.Message != "Xception" {
 		t.Fatal("TestException Xception failed")
 	}
 
-	if err := client.TestException("no Exception"); err != nil {
+	if err := client.TestException(defaultCtx, "no Exception"); err != nil {
 		t.Fatal("TestException no Exception failed")
 	}
 
-	if err := client.TestOneway(0); err != nil {
+	if err := client.TestOneway(defaultCtx, 0); err != nil {
 		t.Fatal("TestOneway failed")
 	}
 }
diff --git a/test/go/Makefile.am b/test/go/Makefile.am
index 4285359..ce711f6 100644
--- a/test/go/Makefile.am
+++ b/test/go/Makefile.am
@@ -18,9 +18,12 @@
 #
 
 BUILT_SOURCES = gopath
+if GOVERSION_LT_17
+COMPILER_EXTRAFLAG=",legacy_context"
+endif
 
 THRIFT = $(top_builddir)/compiler/cpp/thrift
-THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=thrift,legacy_context
+THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=thrift$(COMPILER_EXTRAFLAG)
 THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
 
 precross: bin/testclient bin/testserver
@@ -52,7 +55,7 @@
 
 check_PROGRAMS: bin/testclient bin/testserver bin/stress
 
-check: gopath
+check: gopath genmock
 	GOPATH=`pwd` $(GO) test -v common/...
 
 genmock: gopath
diff --git a/test/go/src/bin/testclient/go17.go b/test/go/src/bin/testclient/go17.go
new file mode 100644
index 0000000..a6003a9
--- /dev/null
+++ b/test/go/src/bin/testclient/go17.go
@@ -0,0 +1,26 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import "context"
+
+var defaultCtx = context.Background()
diff --git a/test/go/src/bin/testclient/main.go b/test/go/src/bin/testclient/main.go
index 228120b..b34c539 100644
--- a/test/go/src/bin/testclient/main.go
+++ b/test/go/src/bin/testclient/main.go
@@ -63,11 +63,11 @@
 
 func callEverything(client *thrifttest.ThriftTestClient) {
 	var err error
-	if err = client.TestVoid(); err != nil {
+	if err = client.TestVoid(defaultCtx); err != nil {
 		t.Fatalf("Unexpected error in TestVoid() call: ", err)
 	}
 
-	thing, err := client.TestString("thing")
+	thing, err := client.TestString(defaultCtx, "thing")
 	if err != nil {
 		t.Fatalf("Unexpected error in TestString() call: ", err)
 	}
@@ -75,14 +75,14 @@
 		t.Fatalf("Unexpected TestString() result, expected 'thing' got '%s' ", thing)
 	}
 
-	bl, err := client.TestBool(true)
+	bl, err := client.TestBool(defaultCtx, true)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestBool() call: ", err)
 	}
 	if !bl {
 		t.Fatalf("Unexpected TestBool() result expected true, got %f ", bl)
 	}
-	bl, err = client.TestBool(false)
+	bl, err = client.TestBool(defaultCtx, false)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestBool() call: ", err)
 	}
@@ -90,7 +90,7 @@
 		t.Fatalf("Unexpected TestBool() result expected false, got %f ", bl)
 	}
 
-	b, err := client.TestByte(42)
+	b, err := client.TestByte(defaultCtx, 42)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestByte() call: ", err)
 	}
@@ -98,7 +98,7 @@
 		t.Fatalf("Unexpected TestByte() result expected 42, got %d ", b)
 	}
 
-	i32, err := client.TestI32(4242)
+	i32, err := client.TestI32(defaultCtx, 4242)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestI32() call: ", err)
 	}
@@ -106,7 +106,7 @@
 		t.Fatalf("Unexpected TestI32() result expected 4242, got %d ", i32)
 	}
 
-	i64, err := client.TestI64(424242)
+	i64, err := client.TestI64(defaultCtx, 424242)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestI64() call: ", err)
 	}
@@ -114,7 +114,7 @@
 		t.Fatalf("Unexpected TestI64() result expected 424242, got %d ", i64)
 	}
 
-	d, err := client.TestDouble(42.42)
+	d, err := client.TestDouble(defaultCtx, 42.42)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestDouble() call: ", err)
 	}
@@ -126,19 +126,19 @@
 	for i := 0; i < 256; i++ {
 		binout[i] = byte(i)
 	}
-	bin, err := client.TestBinary(binout)
+	bin, err := client.TestBinary(defaultCtx, binout)
 	for i := 0; i < 256; i++ {
 		if (binout[i] != bin[i]) {
 			t.Fatalf("Unexpected TestBinary() result expected %d, got %d ", binout[i], bin[i])
 		}
 	}
-	
+
 	xs := thrifttest.NewXtruct()
 	xs.StringThing = "thing"
 	xs.ByteThing = 42
 	xs.I32Thing = 4242
 	xs.I64Thing = 424242
-	xsret, err := client.TestStruct(xs)
+	xsret, err := client.TestStruct(defaultCtx, xs)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestStruct() call: ", err)
 	}
@@ -148,7 +148,7 @@
 
 	x2 := thrifttest.NewXtruct2()
 	x2.StructThing = xs
-	x2ret, err := client.TestNest(x2)
+	x2ret, err := client.TestNest(defaultCtx, x2)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestNest() call: ", err)
 	}
@@ -157,7 +157,7 @@
 	}
 
 	m := map[int32]int32{1: 2, 3: 4, 5: 42}
-	mret, err := client.TestMap(m)
+	mret, err := client.TestMap(defaultCtx, m)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestMap() call: ", err)
 	}
@@ -166,7 +166,7 @@
 	}
 
 	sm := map[string]string{"a": "2", "b": "blah", "some": "thing"}
-	smret, err := client.TestStringMap(sm)
+	smret, err := client.TestStringMap(defaultCtx, sm)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestStringMap() call: ", err)
 	}
@@ -175,7 +175,7 @@
 	}
 
 	s := []int32{1, 2, 42}
-	sret, err := client.TestSet(s)
+	sret, err := client.TestSet(defaultCtx, s)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestSet() call: ", err)
 	}
@@ -191,7 +191,7 @@
 	}
 
 	l := []int32{1, 2, 42}
-	lret, err := client.TestList(l)
+	lret, err := client.TestList(defaultCtx, l)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestList() call: ", err)
 	}
@@ -199,7 +199,7 @@
 		t.Fatalf("Unexpected TestList() result expected %#v, got %#v ", l, lret)
 	}
 
-	eret, err := client.TestEnum(thrifttest.Numberz_TWO)
+	eret, err := client.TestEnum(defaultCtx, thrifttest.Numberz_TWO)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestEnum() call: ", err)
 	}
@@ -207,7 +207,7 @@
 		t.Fatalf("Unexpected TestEnum() result expected %#v, got %#v ", thrifttest.Numberz_TWO, eret)
 	}
 
-	tret, err := client.TestTypedef(thrifttest.UserId(42))
+	tret, err := client.TestTypedef(defaultCtx, thrifttest.UserId(42))
 	if err != nil {
 		t.Fatalf("Unexpected error in TestTypedef() call: ", err)
 	}
@@ -215,7 +215,7 @@
 		t.Fatalf("Unexpected TestTypedef() result expected %#v, got %#v ", thrifttest.UserId(42), tret)
 	}
 
-	mapmap, err := client.TestMapMap(42)
+	mapmap, err := client.TestMapMap(defaultCtx, 42)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestMapMap() call: ", err)
 	}
@@ -242,7 +242,7 @@
 		truck1,
 		truck2,
 	}
-	insanity, err := client.TestInsanity(crazy)
+	insanity, err := client.TestInsanity(defaultCtx, crazy)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestInsanity() call: ", err)
 	}
@@ -261,7 +261,7 @@
 		insanity[2][6])
 	}
 
-	xxsret, err := client.TestMulti(42, 4242, 424242, map[int16]string{1: "blah", 2: "thing"}, thrifttest.Numberz_EIGHT, thrifttest.UserId(24))
+	xxsret, err := client.TestMulti(defaultCtx, 42, 4242, 424242, map[int16]string{1: "blah", 2: "thing"}, thrifttest.Numberz_EIGHT, thrifttest.UserId(24))
 	if err != nil {
 		t.Fatalf("Unexpected error in TestMulti() call: ", err)
 	}
@@ -269,7 +269,7 @@
 		t.Fatalf("Unexpected TestMulti() result expected %#v, got %#v ", xxs, xxsret)
 	}
 
-	err = client.TestException("Xception")
+	err = client.TestException(defaultCtx, "Xception")
 	if err == nil {
 		t.Fatalf("Expecting exception in TestException() call")
 	}
@@ -277,13 +277,13 @@
 		t.Fatalf("Unexpected TestException() result expected %#v, got %#v ", xcept, err)
 	}
 
-	err = client.TestException("TException")
+	err = client.TestException(defaultCtx, "TException")
 	_, ok := err.(thrift.TApplicationException)
 	if err == nil || !ok {
 		t.Fatalf("Unexpected TestException() result expected ApplicationError, got %#v ", err)
 	}
 
-	ign, err := client.TestMultiException("Xception", "ignoreme")
+	ign, err := client.TestMultiException(defaultCtx, "Xception", "ignoreme")
 	if ign != nil || err == nil {
 		t.Fatalf("Expecting exception in TestMultiException() call")
 	}
@@ -291,7 +291,7 @@
 		t.Fatalf("Unexpected TestMultiException() %#v ", err)
 	}
 
-	ign, err = client.TestMultiException("Xception2", "ignoreme")
+	ign, err = client.TestMultiException(defaultCtx, "Xception2", "ignoreme")
 	if ign != nil || err == nil {
 		t.Fatalf("Expecting exception in TestMultiException() call")
 	}
@@ -301,13 +301,13 @@
 		t.Fatalf("Unexpected TestMultiException() %#v ", err)
 	}
 
-	err = client.TestOneway(2)
+	err = client.TestOneway(defaultCtx, 2)
 	if err != nil {
 		t.Fatalf("Unexpected error in TestOneway() call: ", err)
 	}
 
 	//Make sure the connection still alive
-	if err = client.TestVoid(); err != nil {
+	if err = client.TestVoid(defaultCtx); err != nil {
 		t.Fatalf("Unexpected error in TestVoid() call: ", err)
 	}
 }
diff --git a/test/go/src/bin/testclient/pre_go17.go b/test/go/src/bin/testclient/pre_go17.go
new file mode 100644
index 0000000..10a6fb8
--- /dev/null
+++ b/test/go/src/bin/testclient/pre_go17.go
@@ -0,0 +1,26 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import "golang.org/x/net/context"
+
+var defaultCtx = context.Background()
diff --git a/test/go/src/common/clientserver_test.go b/test/go/src/common/clientserver_test.go
index acc3dba..ecd021f 100644
--- a/test/go/src/common/clientserver_test.go
+++ b/test/go/src/common/clientserver_test.go
@@ -120,11 +120,11 @@
 		handler.EXPECT().TestVoid(gomock.Any()),
 	)
 	var err error
-	if err = client.TestVoid(); err != nil {
+	if err = client.TestVoid(defaultCtx); err != nil {
 		t.Errorf("Unexpected error in TestVoid() call: ", err)
 	}
 
-	thing, err := client.TestString("thing")
+	thing, err := client.TestString(defaultCtx, "thing")
 	if err != nil {
 		t.Errorf("Unexpected error in TestString() call: ", err)
 	}
@@ -132,14 +132,14 @@
 		t.Errorf("Unexpected TestString() result, expected 'thing' got '%s' ", thing)
 	}
 
-	bl, err := client.TestBool(true)
+	bl, err := client.TestBool(defaultCtx, true)
 	if err != nil {
 		t.Errorf("Unexpected error in TestBool() call: ", err)
 	}
 	if !bl {
 		t.Errorf("Unexpected TestBool() result expected true, got %f ", bl)
 	}
-	bl, err = client.TestBool(false)
+	bl, err = client.TestBool(defaultCtx, false)
 	if err != nil {
 		t.Errorf("Unexpected error in TestBool() call: ", err)
 	}
@@ -147,7 +147,7 @@
 		t.Errorf("Unexpected TestBool() result expected false, got %f ", bl)
 	}
 
-	b, err := client.TestByte(42)
+	b, err := client.TestByte(defaultCtx, 42)
 	if err != nil {
 		t.Errorf("Unexpected error in TestByte() call: ", err)
 	}
@@ -155,7 +155,7 @@
 		t.Errorf("Unexpected TestByte() result expected 42, got %d ", b)
 	}
 
-	i32, err := client.TestI32(4242)
+	i32, err := client.TestI32(defaultCtx, 4242)
 	if err != nil {
 		t.Errorf("Unexpected error in TestI32() call: ", err)
 	}
@@ -163,7 +163,7 @@
 		t.Errorf("Unexpected TestI32() result expected 4242, got %d ", i32)
 	}
 
-	i64, err := client.TestI64(424242)
+	i64, err := client.TestI64(defaultCtx, 424242)
 	if err != nil {
 		t.Errorf("Unexpected error in TestI64() call: ", err)
 	}
@@ -171,7 +171,7 @@
 		t.Errorf("Unexpected TestI64() result expected 424242, got %d ", i64)
 	}
 
-	d, err := client.TestDouble(42.42)
+	d, err := client.TestDouble(defaultCtx, 42.42)
 	if err != nil {
 		t.Errorf("Unexpected error in TestDouble() call: ", err)
 	}
@@ -186,7 +186,7 @@
 	xs.ByteThing = 42
 	xs.I32Thing = 4242
 	xs.I64Thing = 424242
-	xsret, err := client.TestStruct(xs)
+	xsret, err := client.TestStruct(defaultCtx, xs)
 	if err != nil {
 		t.Errorf("Unexpected error in TestStruct() call: ", err)
 	}
@@ -196,7 +196,7 @@
 
 	x2 := thrifttest.NewXtruct2()
 	x2.StructThing = xs
-	x2ret, err := client.TestNest(x2)
+	x2ret, err := client.TestNest(defaultCtx, x2)
 	if err != nil {
 		t.Errorf("Unexpected error in TestNest() call: ", err)
 	}
@@ -205,7 +205,7 @@
 	}
 
 	m := map[int32]int32{1: 2, 3: 4, 5: 42}
-	mret, err := client.TestMap(m)
+	mret, err := client.TestMap(defaultCtx, m)
 	if err != nil {
 		t.Errorf("Unexpected error in TestMap() call: ", err)
 	}
@@ -214,7 +214,7 @@
 	}
 
 	sm := map[string]string{"a": "2", "b": "blah", "some": "thing"}
-	smret, err := client.TestStringMap(sm)
+	smret, err := client.TestStringMap(defaultCtx, sm)
 	if err != nil {
 		t.Errorf("Unexpected error in TestStringMap() call: ", err)
 	}
@@ -223,7 +223,7 @@
 	}
 
 	s := []int32{1, 2, 42}
-	sret, err := client.TestSet(s)
+	sret, err := client.TestSet(defaultCtx, s)
 	if err != nil {
 		t.Errorf("Unexpected error in TestSet() call: ", err)
 	}
@@ -239,7 +239,7 @@
 	}
 
 	l := []int32{1, 2, 42}
-	lret, err := client.TestList(l)
+	lret, err := client.TestList(defaultCtx, l)
 	if err != nil {
 		t.Errorf("Unexpected error in TestList() call: ", err)
 	}
@@ -247,7 +247,7 @@
 		t.Errorf("Unexpected TestList() result expected %#v, got %#v ", l, lret)
 	}
 
-	eret, err := client.TestEnum(thrifttest.Numberz_TWO)
+	eret, err := client.TestEnum(defaultCtx, thrifttest.Numberz_TWO)
 	if err != nil {
 		t.Errorf("Unexpected error in TestEnum() call: ", err)
 	}
@@ -255,7 +255,7 @@
 		t.Errorf("Unexpected TestEnum() result expected %#v, got %#v ", thrifttest.Numberz_TWO, eret)
 	}
 
-	tret, err := client.TestTypedef(thrifttest.UserId(42))
+	tret, err := client.TestTypedef(defaultCtx, thrifttest.UserId(42))
 	if err != nil {
 		t.Errorf("Unexpected error in TestTypedef() call: ", err)
 	}
@@ -263,7 +263,7 @@
 		t.Errorf("Unexpected TestTypedef() result expected %#v, got %#v ", thrifttest.UserId(42), tret)
 	}
 
-	mapmap, err := client.TestMapMap(42)
+	mapmap, err := client.TestMapMap(defaultCtx, 42)
 	if err != nil {
 		t.Errorf("Unexpected error in TestMapmap() call: ", err)
 	}
@@ -271,7 +271,7 @@
 		t.Errorf("Unexpected TestMapmap() result expected %#v, got %#v ", rmapmap, mapmap)
 	}
 
-	xxsret, err := client.TestMulti(42, 4242, 424242, map[int16]string{1: "blah", 2: "thing"}, thrifttest.Numberz_EIGHT, thrifttest.UserId(24))
+	xxsret, err := client.TestMulti(defaultCtx, 42, 4242, 424242, map[int16]string{1: "blah", 2: "thing"}, thrifttest.Numberz_EIGHT, thrifttest.UserId(24))
 	if err != nil {
 		t.Errorf("Unexpected error in TestMulti() call: ", err)
 	}
@@ -279,7 +279,7 @@
 		t.Errorf("Unexpected TestMulti() result expected %#v, got %#v ", xxs, xxsret)
 	}
 
-	err = client.TestException("some")
+	err = client.TestException(defaultCtx, "some")
 	if err == nil {
 		t.Errorf("Expecting exception in TestException() call")
 	}
@@ -288,13 +288,13 @@
 	}
 
 	// TODO: connection is being closed on this
-	err = client.TestException("TException")
+	err = client.TestException(defaultCtx, "TException")
 	tex, ok := err.(thrift.TApplicationException)
 	if err == nil || !ok || tex.TypeId() != thrift.INTERNAL_ERROR {
 		t.Errorf("Unexpected TestException() result expected ApplicationError, got %#v ", err)
 	}
 
-	ign, err := client.TestMultiException("Xception", "ignoreme")
+	ign, err := client.TestMultiException(defaultCtx, "Xception", "ignoreme")
 	if ign != nil || err == nil {
 		t.Errorf("Expecting exception in TestMultiException() call")
 	}
@@ -302,7 +302,7 @@
 		t.Errorf("Unexpected TestMultiException() %#v ", err)
 	}
 
-	ign, err = client.TestMultiException("Xception2", "ignoreme")
+	ign, err = client.TestMultiException(defaultCtx, "Xception2", "ignoreme")
 	if ign != nil || err == nil {
 		t.Errorf("Expecting exception in TestMultiException() call")
 	}
@@ -312,13 +312,13 @@
 		t.Errorf("Unexpected TestMultiException() %#v ", err)
 	}
 
-	err = client.TestOneway(2)
+	err = client.TestOneway(defaultCtx, 2)
 	if err != nil {
 		t.Errorf("Unexpected error in TestOneway() call: ", err)
 	}
 
 	//Make sure the connection still alive
-	if err = client.TestVoid(); err != nil {
+	if err = client.TestVoid(defaultCtx); err != nil {
 		t.Errorf("Unexpected error in TestVoid() call: ", err)
 	}
 }
diff --git a/test/go/src/common/go17.go b/test/go/src/common/go17.go
new file mode 100644
index 0000000..9aca407
--- /dev/null
+++ b/test/go/src/common/go17.go
@@ -0,0 +1,26 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import "context"
+
+var defaultCtx = context.Background()
diff --git a/test/go/src/common/pre_go17.go b/test/go/src/common/pre_go17.go
new file mode 100644
index 0000000..6c14579
--- /dev/null
+++ b/test/go/src/common/pre_go17.go
@@ -0,0 +1,26 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package common
+
+import "golang.org/x/net/context"
+
+var defaultCtx = context.Background()
diff --git a/tutorial/go/Makefile.am b/tutorial/go/Makefile.am
index c328d38..b6ad9a5 100644
--- a/tutorial/go/Makefile.am
+++ b/tutorial/go/Makefile.am
@@ -17,15 +17,19 @@
 # under the License.
 #
 
+if GOVERSION_LT_17
+COMPILER_EXTRAFLAG=":legacy_context"
+endif
+
 THRIFT = $(top_builddir)/compiler/cpp/thrift
 
 gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift
-	$(THRIFT) --gen go:legacy_context -r $<
+	$(THRIFT) --gen go$(COMPILER_EXTRAFLAG) -r $<
 
 all-local: gen-go/tutorial/calculator.go
 
 check: src/git.apache.org/thrift.git/lib/go/thrift thirdparty-dep
-	$(THRIFT) -r --gen go:legacy_context $(top_srcdir)/tutorial/tutorial.thrift
+	$(THRIFT) -r --gen go$(COMPILER_EXTRAFLAG) $(top_srcdir)/tutorial/tutorial.thrift
 	cp -r gen-go/* src/
 	GOPATH=`pwd` $(GO) build -o go-tutorial ./src
 	GOPATH=`pwd` $(GO) build -o calculator-remote src/tutorial/calculator-remote/calculator-remote.go
diff --git a/tutorial/go/src/client.go b/tutorial/go/src/client.go
index 9106ac9..65027ea 100644
--- a/tutorial/go/src/client.go
+++ b/tutorial/go/src/client.go
@@ -27,17 +27,17 @@
 )
 
 func handleClient(client *tutorial.CalculatorClient) (err error) {
-	client.Ping()
+	client.Ping(defaultCtx)
 	fmt.Println("ping()")
 
-	sum, _ := client.Add(1, 1)
+	sum, _ := client.Add(defaultCtx, 1, 1)
 	fmt.Print("1+1=", sum, "\n")
 
 	work := tutorial.NewWork()
 	work.Op = tutorial.Operation_DIVIDE
 	work.Num1 = 1
 	work.Num2 = 0
-	quotient, err := client.Calculate(1, work)
+	quotient, err := client.Calculate(defaultCtx, 1, work)
 	if err != nil {
 		switch v := err.(type) {
 		case *tutorial.InvalidOperation:
@@ -53,7 +53,7 @@
 	work.Op = tutorial.Operation_SUBTRACT
 	work.Num1 = 15
 	work.Num2 = 10
-	diff, err := client.Calculate(1, work)
+	diff, err := client.Calculate(defaultCtx, 1, work)
 	if err != nil {
 		switch v := err.(type) {
 		case *tutorial.InvalidOperation:
@@ -66,7 +66,7 @@
 		fmt.Print("15-10=", diff, "\n")
 	}
 
-	log, err := client.GetStruct(1)
+	log, err := client.GetStruct(defaultCtx, 1)
 	if err != nil {
 		fmt.Println("Unable to get struct:", err)
 		return err
diff --git a/tutorial/go/src/go17.go b/tutorial/go/src/go17.go
new file mode 100644
index 0000000..a6003a9
--- /dev/null
+++ b/tutorial/go/src/go17.go
@@ -0,0 +1,26 @@
+// +build go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import "context"
+
+var defaultCtx = context.Background()
diff --git a/tutorial/go/src/pre_go17.go b/tutorial/go/src/pre_go17.go
new file mode 100644
index 0000000..10a6fb8
--- /dev/null
+++ b/tutorial/go/src/pre_go17.go
@@ -0,0 +1,26 @@
+// +build !go1.7
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package main
+
+import "golang.org/x/net/context"
+
+var defaultCtx = context.Background()
