Skip to content

Commit

Permalink
Reduce memory usage when calculating release shasum
Browse files Browse the repository at this point in the history
  • Loading branch information
geofffranks committed Nov 11, 2024
1 parent 06bdb0e commit 9ac2e96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cargo/bosh_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func ReadBOSHReleaseTarball(tarballPath string, r io.Reader) (BOSHReleaseTarball
if err != nil {
return BOSHReleaseTarball{}, err
}
_, err = io.ReadAll(r)
_, err = io.CopyBuffer(io.Discard, r, make([]byte, 1024 * 64))
return BOSHReleaseTarball{
Manifest: m,
SHA1: hex.EncodeToString(sum.Sum(nil)),
Expand Down

0 comments on commit 9ac2e96

Please sign in to comment.