From ca13f5e54da2d88a65b99814e13c23834ae44342 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sat, 25 Feb 2017 12:09:14 +0300 Subject: [PATCH] Could -> can, for consistency --- src/cypherpunks.ru/govpn/cmd/govpn-client/main.go | 2 +- src/cypherpunks.ru/govpn/common.go | 2 +- src/cypherpunks.ru/govpn/identity.go | 2 +- src/cypherpunks.ru/govpn/stats.go | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go b/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go index 31f9e6e..bd8b067 100644 --- a/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go +++ b/src/cypherpunks.ru/govpn/cmd/govpn-client/main.go @@ -71,7 +71,7 @@ func main() { logger, err := govpn.NewLogger(*logLevel, *syslog) if err != nil { - logrus.WithFields(fields).WithError(err).Fatal("Couldn't initialize logging") + logrus.WithFields(fields).WithError(err).Fatal("Can't initialize logging") } if *egdPath != "" { diff --git a/src/cypherpunks.ru/govpn/common.go b/src/cypherpunks.ru/govpn/common.go index 003792e..3fe3165 100644 --- a/src/cypherpunks.ru/govpn/common.go +++ b/src/cypherpunks.ru/govpn/common.go @@ -182,6 +182,6 @@ func SetLogger(l *logrus.Logger) { // CloseLog log an error if a io.Closer fail to Close func CloseLog(c io.Closer, l *logrus.Logger, fields logrus.Fields) { if err := c.Close(); err != nil { - logrus.WithFields(fields).WithError(err).Error("Couldn't close connection") + logrus.WithFields(fields).WithError(err).Error("Can't close connection") } } diff --git a/src/cypherpunks.ru/govpn/identity.go b/src/cypherpunks.ru/govpn/identity.go index 83e0282..52d430d 100644 --- a/src/cypherpunks.ru/govpn/identity.go +++ b/src/cypherpunks.ru/govpn/identity.go @@ -179,6 +179,6 @@ func (mc *MACCache) Find(data []byte) (*PeerID, error) { logger.WithFields(fields).WithFields(loopFields).Debug("Not matching peer") } - logger.WithFields(fields).Debug("Couldn't find matching peer ID") + logger.WithFields(fields).Debug("Can't find matching peer ID") return nil, nil } diff --git a/src/cypherpunks.ru/govpn/stats.go b/src/cypherpunks.ru/govpn/stats.go index 757eb55..2fa90e4 100644 --- a/src/cypherpunks.ru/govpn/stats.go +++ b/src/cypherpunks.ru/govpn/stats.go @@ -60,7 +60,7 @@ func StatsProcessor(stats string, peers *KnownPeers) { for { conn, err = statsPort.Accept() if err != nil { - logger.WithFields(fields).WithError(err).Error("Couldn't accept connection") + logger.WithFields(fields).WithError(err).Error("Can't accept connection") continue } deadLine := time.Now().Add(rwTimeout) @@ -69,9 +69,9 @@ func StatsProcessor(stats string, peers *KnownPeers) { "deadline", deadLine.String(), ).WithError(err).Error("Can't set deadline") } else if _, err = conn.Read(buf); err != nil { - logger.WithFields(fields).WithError(err).Error("Couldn't read buffer") + logger.WithFields(fields).WithError(err).Error("Can't read buffer") } else if _, err = conn.Write([]byte("HTTP/1.0 200 OK\r\nContent-Type: application/json\r\n\r\n")); err != nil { - logger.WithFields(fields).WithError(err).Error("Couldn't write HTTP headers") + logger.WithFields(fields).WithError(err).Error("Can't write HTTP headers") } else { var peersList []*Peer for _, peer := range *peers { @@ -84,7 +84,7 @@ func StatsProcessor(stats string, peers *KnownPeers) { } } if err = conn.Close(); err != nil { - logger.WithFields(fields).WithError(err).Error("Couldn't close connection") + logger.WithFields(fields).WithError(err).Error("Can't close connection") } } } -- 2.44.0