You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Go 1.18, new read/write methods were added to net.UDPConn to take advantage of the new netip value types. I updated my code to use these new methods. But the expected savings fail to manifest, because for debug and error logs I had to pass the returned netip.AddrPort value to zap as Stringer, which leads the Go compiler to allocate them on the heap.
It'd be nice if zap has support for these new types. But I could see the difficulty of retrofitting these types into the Field struct.
The text was updated successfully, but these errors were encountered:
In Go 1.18, new read/write methods were added to
net.UDPConn
to take advantage of the newnetip
value types. I updated my code to use these new methods. But the expected savings fail to manifest, because for debug and error logs I had to pass the returnednetip.AddrPort
value tozap
asStringer
, which leads the Go compiler to allocate them on the heap.It'd be nice if zap has support for these new types. But I could see the difficulty of retrofitting these types into the
Field
struct.The text was updated successfully, but these errors were encountered: