mirror of
https://github.com/prometheus/prometheus
synced 2024-12-26 08:33:06 +00:00
[Comment] Correct the comment on Decbuf.UvarintBytes
The value is valid when returned, but can become invalid later. Return to previous wording. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
This commit is contained in:
parent
a77f5007f9
commit
0a4f130b39
@ -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…
Reference in New Issue
Block a user