Update to Go 1.25, fix go vet errors
This commit is contained in:
parent
596691457a
commit
b83a572500
3 changed files with 28 additions and 7 deletions
4
conn.go
4
conn.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue