File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -207,13 +207,19 @@ func (b *buffer) String() string {
207
207
208
208
// ReadUnsafe reads bytes from the given Buffer into the provided slice.
209
209
// It does not perform safety checks.
210
+ //
211
+ // The returned Buffer MUST be used in place of the one passed in, as it may
212
+ // have been modified or freed.
210
213
func ReadUnsafe (dst []byte , buf Buffer ) (int , Buffer ) {
211
214
return buf .read (dst )
212
215
}
213
216
214
217
// SplitUnsafe modifies the receiver to point to the first n bytes while it
215
218
// returns a new reference to the remaining bytes. The returned Buffer
216
219
// functions just like a normal reference acquired using Ref().
220
+ //
221
+ // The returned Buffer values MUST be used in place of the one passed in, as it
222
+ // may have been modified or freed.
217
223
func SplitUnsafe (buf Buffer , n int ) (left , right Buffer ) {
218
224
return buf .split (n )
219
225
}
You can’t perform that action at this time.
0 commit comments