Fix Workhorse linter warnings (part 29)
Problem
make golangci
linter detects warnings in following Workhorse files
How to verify
make golangci | grep -E "^internal/upload/destination/(destination|filesto|multi)"
internal/upload/destination/destination.go:116: Function 'Upload' has too many statements (48 > 40) (funlen)
internal/upload/destination/destination.go:1:1: package-comments: package comment should be of the form "Package destination ..." (revive)
internal/upload/destination/destination.go:241:12: Error return value of `os.Remove` is not checked (errcheck)
internal/upload/destination/destination.go:24:6: exported: exported type SizeError should have comment or be unexported (revive)
internal/upload/destination/destination.go:71: internal/upload/destination/destination.go:71: Line contains TODO/BUG/FIXME/NOTE/OPTIMIZE/HACK: "TODO: remove `data` these once rails ful..." (godox)
internal/upload/destination/destination_test.go:100:34: string `?Signature=AnotherSignature` has 6 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:104:48: string `?partNumber=1` has 4 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:162:21: string `test-file` has 4 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:177:77: string `?partNumber=2` has 3 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:178:51: string `?Signature=CompleteSignature` has 3 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:208:8: shadow: declaration of "err" shadows declaration at line 199 (govet)
internal/upload/destination/destination_test.go:268: unnecessary leading newline (whitespace)
internal/upload/destination/destination_test.go:276:20: string `tmp/test-file/1` has 3 occurrences, make it a constant (goconst)
internal/upload/destination/destination_test.go:485:6: error-is-as: use require.ErrorIs (testifylint)
internal/upload/destination/destination_test.go:99:34: string `?Signature=ASignature` has 3 occurrences, make it a constant (goconst)
internal/upload/destination/filestore/filestore.go:10:6: exported: exported type LocalFile should have comment or be unexported (revive)
internal/upload/destination/filestore/filestore.go:14:1: exported: exported method LocalFile.Consume should have comment or be unexported (revive)
internal/upload/destination/filestore/filestore.go:1:1: package-comments: package comment should be of the form "Package filestore ..." (revive)
internal/upload/destination/filestore/filestore.go:23:1: exported: exported method LocalFile.ConsumeWithoutDelete should have comment or be unexported (revive)
internal/upload/destination/multi_hash.go:4:2: G501: Blocklisted import crypto/md5: weak cryptographic primitive (gosec)
internal/upload/destination/multi_hash.go:5:2: G505: Blocklisted import crypto/sha1: weak cryptographic primitive (gosec)
Solution
Resolve warnings
Edited by Vasilii Iakliushin