diff --git a/tutorial/go/src/client.go b/tutorial/go/src/client.go
index 8776f9c..f944cf8 100644
--- a/tutorial/go/src/client.go
+++ b/tutorial/go/src/client.go
@@ -21,7 +21,6 @@
 
 import (
 	"context"
-	"crypto/tls"
 	"fmt"
 
 	"github.com/apache/thrift/lib/go/thrift"
@@ -79,21 +78,14 @@
 	return err
 }
 
-func runClient(transportFactory thrift.TTransportFactory, protocolFactory thrift.TProtocolFactory, addr string, secure bool) error {
+func runClient(transportFactory thrift.TTransportFactory, protocolFactory thrift.TProtocolFactory, addr string, secure bool, cfg *thrift.TConfiguration) error {
 	var transport thrift.TTransport
-	var err error
 	if secure {
-		cfg := new(tls.Config)
-		cfg.InsecureSkipVerify = true
-		transport, err = thrift.NewTSSLSocket(addr, cfg)
+		transport = thrift.NewTSSLSocketConf(addr, cfg)
 	} else {
-		transport, err = thrift.NewTSocket(addr)
+		transport = thrift.NewTSocketConf(addr, cfg)
 	}
-	if err != nil {
-		fmt.Println("Error opening socket:", err)
-		return err
-	}
-	transport, err = transportFactory.GetTransport(transport)
+	transport, err := transportFactory.GetTransport(transport)
 	if err != nil {
 		return err
 	}
diff --git a/tutorial/go/src/handler.go b/tutorial/go/src/handler.go
index 7645fc2..a9edd26 100644
--- a/tutorial/go/src/handler.go
+++ b/tutorial/go/src/handler.go
@@ -51,13 +51,10 @@
 	switch w.Op {
 	case tutorial.Operation_ADD:
 		val = w.Num1 + w.Num2
-		break
 	case tutorial.Operation_SUBTRACT:
 		val = w.Num1 - w.Num2
-		break
 	case tutorial.Operation_MULTIPLY:
 		val = w.Num1 * w.Num2
-		break
 	case tutorial.Operation_DIVIDE:
 		if w.Num2 == 0 {
 			ouch := tutorial.NewInvalidOperation()
@@ -67,7 +64,6 @@
 			return
 		}
 		val = w.Num1 / w.Num2
-		break
 	default:
 		ouch := tutorial.NewInvalidOperation()
 		ouch.WhatOp = int32(w.Op)
@@ -93,7 +89,7 @@
 
 func (p *CalculatorHandler) GetStruct(ctx context.Context, key int32) (*shared.SharedStruct, error) {
 	fmt.Print("getStruct(", key, ")\n")
-	v, _ := p.log[int(key)]
+	v := p.log[int(key)]
 	return v, nil
 }
 
diff --git a/tutorial/go/src/main.go b/tutorial/go/src/main.go
index afac6bb..2b6f230 100644
--- a/tutorial/go/src/main.go
+++ b/tutorial/go/src/main.go
@@ -20,6 +20,7 @@
  */
 
 import (
+	"crypto/tls"
 	"flag"
 	"fmt"
 	"os"
@@ -47,13 +48,13 @@
 	var protocolFactory thrift.TProtocolFactory
 	switch *protocol {
 	case "compact":
-		protocolFactory = thrift.NewTCompactProtocolFactory()
+		protocolFactory = thrift.NewTCompactProtocolFactoryConf(nil)
 	case "simplejson":
-		protocolFactory = thrift.NewTSimpleJSONProtocolFactory()
+		protocolFactory = thrift.NewTSimpleJSONProtocolFactoryConf(nil)
 	case "json":
 		protocolFactory = thrift.NewTJSONProtocolFactory()
 	case "binary", "":
-		protocolFactory = thrift.NewTBinaryProtocolFactoryDefault()
+		protocolFactory = thrift.NewTBinaryProtocolFactoryConf(nil)
 	default:
 		fmt.Fprint(os.Stderr, "Invalid protocol specified", protocol, "\n")
 		Usage()
@@ -61,6 +62,11 @@
 	}
 
 	var transportFactory thrift.TTransportFactory
+	cfg := &thrift.TConfiguration{
+		TLSConfig: &tls.Config{
+			InsecureSkipVerify: true,
+		},
+	}
 	if *buffered {
 		transportFactory = thrift.NewTBufferedTransportFactory(8192)
 	} else {
@@ -68,7 +74,7 @@
 	}
 
 	if *framed {
-		transportFactory = thrift.NewTFramedTransportFactory(transportFactory)
+		transportFactory = thrift.NewTFramedTransportFactoryConf(transportFactory, cfg)
 	}
 
 	if *server {
@@ -76,7 +82,7 @@
 			fmt.Println("error running server:", err)
 		}
 	} else {
-		if err := runClient(transportFactory, protocolFactory, *addr, *secure); err != nil {
+		if err := runClient(transportFactory, protocolFactory, *addr, *secure, cfg); err != nil {
 			fmt.Println("error running client:", err)
 		}
 	}
