1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2025-07-26 17:00:28 +00:00

*.go: linting project specific code

the pointer to the pool may be useful, but holding on that until I get
benchmarks of memory use to show the benefit.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-03-25 19:20:31 -04:00
parent 19fa6f3d1e
commit 516158dbfb
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED
4 changed files with 28 additions and 16 deletions

View file

@ -71,6 +71,8 @@ func WriteOutputTarStream(fg storage.FileGetter, up storage.Unpacker, w io.Write
crcSum = make([]byte, 8)
multiWriter = io.MultiWriter(w, crcHash)
copyBuffer = byteBufferPool.Get().([]byte)
// TODO once we have some benchmark or memory profile then we can experiment with using *bytes.Buffer
//nolint:staticcheck // SA6002 not going to do a pointer here
defer byteBufferPool.Put(copyBuffer)
} else {
crcHash.Reset()