Change-Id: I213d00c15f7a6486481ef6677612ea11bccfb91b
This commit is contained in:
Mateusz Poliwczak 2024-07-29 20:34:15 +02:00
parent d6beafaa76
commit 4f78947ac5
2 changed files with 2 additions and 2 deletions

View File

@ -2,4 +2,4 @@ Two new interfaces, [TextAppender] and [BinaryAppender], have been
introduced to append the textual or binary representation of an object
to a byte slice. These interfaces provide the same functionality as
[TextMarshaler] and [BinaryMarshaler], but instead of allocating a new slice
each time, they append the data directly to the existing slice
each time, they append the data directly to an existing slice.

View File

@ -36,7 +36,7 @@ type BinaryUnmarshaler interface {
}
// BinaryAppender is the interface implemented by an object
// that can append the bianry representation of itself.
// that can append the binary representation of itself.
// If a type implements both [BinaryAppender] and [BinaryMarshaler],
// then v.MarshalBinary() must be semantically identical to v.AppendBinary(nil).
type BinaryAppender interface {