Commit 70d8013
committed
refactor(builder): use io.Copy(hash, reader) directly
Simplify computeDigestAndSize by copying directly to the sha256
writer instead of using io.TeeReader + io.Discard. hash.Hash
already implements io.Writer, making the tee unnecessary.
Addresses review feedback on PR #474.
Signed-off-by: Zhao Chen <winters.zc@antgroup.com>1 parent ccb9228 commit 70d8013
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
| 269 | + | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
| |||
0 commit comments