X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fcypherpunks.ru%2Fgovpn%2Fidentity.go;fp=src%2Fcypherpunks.ru%2Fgovpn%2Fidentity.go;h=db338f0348c98b9e5593c17872664e663e9eda17;hb=c4ce2306df402e03b7fd0f2f10e07cf21b2babc2;hp=81066bc715abbe961eb9225d60ee3dfd2b2b94b5;hpb=012173bd090f87e8dffbc124f41425eef8a9a7f8;p=govpn.git diff --git a/src/cypherpunks.ru/govpn/identity.go b/src/cypherpunks.ru/govpn/identity.go index 81066bc..db338f0 100644 --- a/src/cypherpunks.ru/govpn/identity.go +++ b/src/cypherpunks.ru/govpn/identity.go @@ -86,7 +86,12 @@ func (mc *MACCache) Update(peers *map[PeerID]*PeerConf) error { delete(mc.cache, pid) } } - logger.WithFields(fields).WithField("size", mc.Length()).Debug("Cleaned, add/update new key") + logger.WithFields( + fields, + ).WithField( + "size", + mc.Length(), + ).Debug("Cleaned, add/update new key") for pid, pc := range *peers { if _, exists := mc.cache[pid]; exists { logger.WithFields(fields).WithFields( @@ -133,7 +138,12 @@ func AddTimeSync(ts int, data []byte) { for i := 0; i < 8; i++ { data[i] ^= buf[i] } - logger.WithFields(fields).WithField("after", hex.EncodeToString(data)).Debug("Done") + logger.WithFields( + fields, + ).WithField( + "after", + hex.EncodeToString(data), + ).Debug("Done") } // Find tries to find peer's identity (that equals to MAC) @@ -166,7 +176,12 @@ func (mc *MACCache) Find(data []byte) (*PeerID, error) { mt.l.Unlock() return nil, errors.Wrap(err, "mt.mac.Write") } - logger.WithFields(fields).WithField("buf", hex.EncodeToString(buf[:0])).Debug("mt.mac.Sum") + logger.WithFields( + fields, + ).WithField( + "buf", + hex.EncodeToString(buf[:0]), + ).Debug("mt.mac.Sum") mt.mac.Sum(sum[:0]) mt.l.Unlock()