mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-22 19:19:09 +00:00
Merge pull request #3663 from nspcc-dev/io-improve-bytes-doc
io: specify Bytes() behavior a bit better for BufBinWriter
This commit is contained in:
commit
1a540d5883
1 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,8 @@ func (bw *BufBinWriter) Len() int {
|
|||
}
|
||||
|
||||
// Bytes returns the resulting buffer and makes future writes return an error.
|
||||
// Subsequent calls to it will return nil. You can reuse this instance of
|
||||
// [BufBinWriter] after [BufBinWriter.Reset].
|
||||
func (bw *BufBinWriter) Bytes() []byte {
|
||||
if bw.Err != nil {
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue