mirror of
https://github.com/prometheus/prometheus.git
synced 2025-08-06 14:17:12 +02:00
Merge pull request #14767 from bboreham/fix-encoding-comment
[Comment] Correct the comment on Decbuf.UvarintBytes
This commit is contained in:
commit
16e5e99546
@ -201,8 +201,9 @@ func (d *Decbuf) UvarintStr() string {
|
|||||||
return string(d.UvarintBytes())
|
return string(d.UvarintBytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
// UvarintBytes returns invalid values if the byte slice goes away.
|
// UvarintBytes returns a pointer to internal data;
|
||||||
// Compared to UvarintStr, it avoid allocations.
|
// the return value becomes invalid if the byte slice goes away.
|
||||||
|
// Compared to UvarintStr, this avoids allocations.
|
||||||
func (d *Decbuf) UvarintBytes() []byte {
|
func (d *Decbuf) UvarintBytes() []byte {
|
||||||
l := d.Uvarint64()
|
l := d.Uvarint64()
|
||||||
if d.E != nil {
|
if d.E != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user