Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Handshake has no state beyond the main function call
Browse files Browse the repository at this point in the history
  • Loading branch information
pietern committed Jun 2, 2012
1 parent 2c5dc36 commit 0a09b9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handshake.go
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 0a09b9a

Please sign in to comment.