Update to Go 1.25, fix go vet errors

This commit is contained in:
Laurence Withers 2026-01-15 09:47:42 +00:00
commit b83a572500
3 changed files with 28 additions and 7 deletions

View file

@ -86,7 +86,7 @@ func (c *Conn) EntryErr(pri Priority, msg string, attrs []Attr) error {
a = append(a, c.Common...)
a = append(a, attrs...)
err := c.WriteAttrs(a)
slices.Delete(a, 0, len(a)) // ensure GC doesn't see refs to old data
a = slices.Delete(a, 0, len(a)) // ensure GC doesn't see refs to old data
c.atts.Put(a)
return err
}
@ -97,7 +97,7 @@ func (c *Conn) WriteAttrs(attrs []Attr) error {
buf := c.bufs.Get().(*net.Buffers)
*buf = (*buf)[:0]
err := WireWrite(buf, c.s, attrs)
slices.Delete(*buf, 0, len(*buf)) // ensure GC doesn't see refs to old data
*buf = slices.Delete(*buf, 0, len(*buf)) // ensure GC doesn't see refs to old data
c.bufs.Put(buf)
return err
}