mirror of
https://github.com/vbatts/tar-split.git
synced 2024-11-25 09:15:40 +00:00
archive/tar: cleaner reset
This commit is contained in:
parent
43b7a5effb
commit
50168a6bb3
1 changed files with 2 additions and 4 deletions
|
@ -52,10 +52,8 @@ func (tr *Reader) RawBytes() []byte {
|
|||
if tr.rawBytes == nil {
|
||||
tr.rawBytes = bytes.NewBuffer(nil)
|
||||
}
|
||||
defer func() {
|
||||
// if we've read them, then flush them.
|
||||
tr.rawBytes.Reset()
|
||||
}()
|
||||
// if we've read them, then flush them.
|
||||
defer tr.rawBytes.Reset()
|
||||
return tr.rawBytes.Bytes()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue