Use logger.Logf consistently. It was used in most places.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-02-11 09:37:20 -08:00
parent c1917710ad
commit a59dc5f155
4 changed files with 13 additions and 8 deletions

View File

@ -15,18 +15,19 @@ import (
"golang.org/x/crypto/curve25519"
"golang.org/x/crypto/nacl/box"
"tailscale.com/logger"
)
type Client struct {
serverKey [32]byte
privateKey [32]byte // TODO(crawshaw): make this wgcfg.PrivateKey?
publicKey [32]byte
logf func(format string, args ...interface{})
logf logger.Logf
netConn net.Conn
conn *bufio.ReadWriter
}
func NewClient(privateKey [32]byte, netConn net.Conn, conn *bufio.ReadWriter, logf func(format string, args ...interface{})) (*Client, error) {
func NewClient(privateKey [32]byte, netConn net.Conn, conn *bufio.ReadWriter, logf logger.Logf) (*Client, error) {
c := &Client{
privateKey: privateKey,
logf: logf,