From 9c3def8cdb50928a95b372bc09426aab2d9a947c Mon Sep 17 00:00:00 2001 From: fangdingjun Date: Thu, 5 Jan 2017 10:37:13 +0800 Subject: [PATCH] go vet --- client.go | 4 ++-- socks4.go | 2 +- socks5.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index d9425cc..3c6e482 100755 --- a/client.go +++ b/client.go @@ -34,11 +34,11 @@ func (sc *Client) handShake() error { } if buf[0] != socks5Version { - return fmt.Errorf("error socks version %s", buf[0]) + return fmt.Errorf("error socks version %d", buf[0]) } if buf[1] != 0x00 && buf[1] != 0x02 { - return fmt.Errorf("server return with code %s", buf[1]) + return fmt.Errorf("server return with code %d", buf[1]) } if buf[1] == 0x00 { diff --git a/socks4.go b/socks4.go index 0eeda0d..7472b90 100755 --- a/socks4.go +++ b/socks4.go @@ -87,7 +87,7 @@ func (s4 *socks4Conn) processRequest() error { // command only support connect if buf[0] != cmdConnect { - return fmt.Errorf("error command %s", buf[0]) + return fmt.Errorf("error command %d", buf[0]) } // get port diff --git a/socks5.go b/socks5.go index 7a4a638..13f8ef1 100755 --- a/socks5.go +++ b/socks5.go @@ -196,7 +196,7 @@ func (s5 *socks5Conn) processRequest() error { // command only support connect if buf[1] != cmdConnect { - return fmt.Errorf("unsupported command %s", buf[1]) + return fmt.Errorf("unsupported command %d", buf[1]) } hlen := 0 // target address length