magnetico/pkg/util/util.go
Bora Alper dc420da802 cumulative commit! (see the description for changes)
magneticod:
!!! disabled the gradual increase in congestion control, for some reason we still can't detect congestion...
- `*net.UDPAddr` in dht/mainline instead of `net.Addr`
- fixed a bug when a very small extension message received
- simplified how peer adress is handled in bittorrent/metadata/sink
- simplified TrawlingResult in dht/mainline

magneticow:
- use WAL for sqlite3

persistence:
- use URL.String() instead of url.Path in sql.Open() so that URL parameters are not lost...
2018-08-03 11:28:50 +03:00

11 lines
216 B
Go

package util
import (
"encoding/hex"
"go.uber.org/zap/zapcore"
)
func HexField(key string, val []byte) zapcore.Field {
return zapcore.Field{Key: key, Type: zapcore.StringType, String: hex.EncodeToString(val)}
}