Browse Source

Merge pull request #14767 from bboreham/fix-encoding-comment

[Comment] Correct the comment on Decbuf.UvarintBytes
pull/14871/head
Bryan Boreham 2 months ago committed by GitHub
parent
commit
16e5e99546
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      tsdb/encoding/encoding.go

5
tsdb/encoding/encoding.go

@ -201,8 +201,9 @@ func (d *Decbuf) UvarintStr() string {
return string(d.UvarintBytes())
}
// UvarintBytes returns invalid values if the byte slice goes away.
// Compared to UvarintStr, it avoid allocations.
// UvarintBytes returns a pointer to internal data;
// the return value becomes invalid if the byte slice goes away.
// Compared to UvarintStr, this avoids allocations.
func (d *Decbuf) UvarintBytes() []byte {
l := d.Uvarint64()
if d.E != nil {

Loading…
Cancel
Save