Permalink
Browse files

Handshake has no state beyond the main function call

  • Loading branch information...
1 parent 2c5dc36 commit 0a09b9a9a92af9be8683335dd176db35752cbf46 @pietern pietern committed Jun 2, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 handshake.go
View
@@ -16,13 +16,13 @@ type Handshaker interface {
Handshake(net.Conn) (net.Conn, error)
}
-var EmptyHandshake = &emptyHandshake{}
+var EmptyHandshake = emptyHandshake{}
type emptyHandshake struct {
// Not much...
}
-func (h *emptyHandshake) Handshake(n net.Conn) (net.Conn, error) {
+func (h emptyHandshake) Handshake(n net.Conn) (net.Conn, error) {
return n, nil
}
@@ -31,7 +31,7 @@ type Handshake struct {
Password string
}
-func (h *Handshake) Handshake(c net.Conn) (net.Conn, error) {
+func (h Handshake) Handshake(c net.Conn) (net.Conn, error) {
var r = bufio.NewReader(c)
var w = bufio.NewWriter(c)
var ro readObject

0 comments on commit 0a09b9a

Please sign in to comment.