diff options
author | David Anderson <[email protected]> | 2017-01-01 14:22:15 -0800 |
---|---|---|
committer | David Anderson <[email protected]> | 2017-01-01 14:22:15 -0800 |
commit | 6546db44e46c75d1ec05fbd47f1396c49705c34d (patch) | |
tree | f5fe43794dd2090b3910918ebaf6bbe75c35173e | |
parent | e34c2a61afa52bf8cc245c1ff75cca10b231050e (diff) |
Fix vet errors in Go 1.6.
-rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |