THRIFT-2851 Remove strange public Peek() from Go transports
Client: Go
Patch: Chi Vinh Le

This closes #283

In its current form Peek() is not only useless, but misleading.
If anyone can provide a better implementation, please do.
diff --git a/lib/go/thrift/http_client.go b/lib/go/thrift/http_client.go
index df66897..2bce078 100644
--- a/lib/go/thrift/http_client.go
+++ b/lib/go/thrift/http_client.go
@@ -129,10 +129,6 @@
 	return p.response != nil || p.requestBuffer != nil
 }
 
-func (p *THttpClient) Peek() bool {
-	return p.IsOpen()
-}
-
 func (p *THttpClient) Close() error {
 	if p.response != nil && p.response.Body != nil {
 		err := p.response.Body.Close()
diff --git a/lib/go/thrift/iostream_transport.go b/lib/go/thrift/iostream_transport.go
index cdff544..8fc0214 100644
--- a/lib/go/thrift/iostream_transport.go
+++ b/lib/go/thrift/iostream_transport.go
@@ -106,10 +106,6 @@
 	}
 }
 
-// func (p *StreamTransport) Peek() bool {
-// 	return p.IsOpen()
-// }
-
 // Closes both the input and output streams.
 func (p *StreamTransport) Close() error {
 	if p.closed {
diff --git a/lib/go/thrift/memory_buffer.go b/lib/go/thrift/memory_buffer.go
index c48e089..59e4542 100644
--- a/lib/go/thrift/memory_buffer.go
+++ b/lib/go/thrift/memory_buffer.go
@@ -64,10 +64,6 @@
 	return nil
 }
 
-func (p *TMemoryBuffer) Peek() bool {
-	return p.IsOpen()
-}
-
 func (p *TMemoryBuffer) Close() error {
 	p.Buffer.Reset()
 	return nil
diff --git a/lib/go/thrift/socket.go b/lib/go/thrift/socket.go
index 5b3944d..6c24748 100644
--- a/lib/go/thrift/socket.go
+++ b/lib/go/thrift/socket.go
@@ -148,10 +148,6 @@
 	return p.conn.Write(buf)
 }
 
-func (p *TSocket) Peek() bool {
-	return p.IsOpen()
-}
-
 func (p *TSocket) Flush() error {
 	return nil
 }
diff --git a/lib/go/thrift/ssl_socket.go b/lib/go/thrift/ssl_socket.go
index d28975e..38f66c4 100644
--- a/lib/go/thrift/ssl_socket.go
+++ b/lib/go/thrift/ssl_socket.go
@@ -20,9 +20,9 @@
 package thrift
 
 import (
+	"crypto/tls"
 	"net"
 	"time"
-	"crypto/tls"
 )
 
 type TSSLSocket struct {
@@ -145,10 +145,6 @@
 	return p.conn.Write(buf)
 }
 
-func (p *TSSLSocket) Peek() bool {
-	return p.IsOpen()
-}
-
 func (p *TSSLSocket) Flush() error {
 	return nil
 }