encoding/json/jsontext: remove Encoder.UnusedBuffer
WARNING: This commit contains a breaking change. This is permissible since jsontext is experimental and not subject to the Go 1 compatibility agreement. Existing callers of UnusedBuffer should use AvailableBuffer instead. Updates #71497 Change-Id: Ib080caf306d545a8fb038e57f0817b18dd0f91cf Reviewed-on: https://go-review.googlesource.com/c/go/+/683897 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Joseph Tsai <joetsai@digital-static.net>
This commit is contained in:
@@ -900,11 +900,6 @@ func (e *Encoder) OutputOffset() int64 {
|
|||||||
return e.s.previousOffsetEnd()
|
return e.s.previousOffsetEnd()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use [Encoder.AvailableBuffer] instead.
|
|
||||||
func (e *Encoder) UnusedBuffer() []byte {
|
|
||||||
return e.AvailableBuffer()
|
|
||||||
}
|
|
||||||
|
|
||||||
// AvailableBuffer returns a zero-length buffer with a possible non-zero capacity.
|
// AvailableBuffer returns a zero-length buffer with a possible non-zero capacity.
|
||||||
// This buffer is intended to be used to populate a [Value]
|
// This buffer is intended to be used to populate a [Value]
|
||||||
// being passed to an immediately succeeding [Encoder.WriteValue] call.
|
// being passed to an immediately succeeding [Encoder.WriteValue] call.
|
||||||
|
|||||||
Reference in New Issue
Block a user