From 6546db44e46c75d1ec05fbd47f1396c49705c34d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 1 Jan 2017 14:22:15 -0800 Subject: Fix vet errors in Go 1.6. --- main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 858bc74..9acefef 100644 --- a/main.go +++ b/main.go @@ -63,16 +63,16 @@ type Conn struct { backendConn *net.TCPConn } -func (c *Conn) log(msg string, args ...interface{}) { +func (c *Conn) logf(msg string, args ...interface{}) { msg = fmt.Sprintf(msg, args...) log.Printf("%s <> %s: %s", c.RemoteAddr(), c.LocalAddr(), msg) } func (c *Conn) abort(alert byte, msg string, args ...interface{}) { - c.log(msg, args...) + c.logf(msg, args...) alertMsg := []byte{21, 3, byte(c.tlsMinor), 0, 2, 2, alert} if _, err := c.Write(alertMsg); err != nil { - c.log("error while sending alert: %s", err) + c.logf("error while sending alert: %s", err) } } @@ -98,7 +98,7 @@ func (c *Conn) proxy() { return } - c.log("routing %q to %q", c.hostname, c.backend) + c.logf("routing %q to %q", c.hostname, c.backend) backend, err := net.DialTimeout("tcp", c.backend, 10*time.Second) if err != nil { c.internalError("failed to dial backend %q for %q: %s", c.backend, c.hostname, err) -- cgit v1.2.3