[#1718] linter: Resolve gocritic's unlambda linter

See https://go-critic.com/overview#unlambda for details.

Change-Id: Iccb2d293ce31a302fcbb2c3f9c55c9b3fa554db5
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2025-04-16 14:46:31 +03:00
parent b88fe8c4a7
commit ca8b01667f
Signed by: dstepanov-yadro
GPG key ID: 237AF1A763293BC0

View file

@ -182,9 +182,7 @@ func (s *Service) toHashRangePrm(req *objectV2.GetRangeHashRequest) (*getsvc.Ran
default:
return nil, errUnknownChechsumType(t)
case refs.SHA256:
p.SetHashGenerator(func() hash.Hash {
return sha256.New()
})
p.SetHashGenerator(sha256.New)
case refs.TillichZemor:
p.SetHashGenerator(func() hash.Hash {
return tz.New()