Fix Workhorse linter warnings (part 12)
Problem
make golangci
linter detects warnings in following Workhorse files
How to verify
make golangci | grep -E "^internal/gitaly"
internal/gitaly/blob.go:14:6: exported: exported type BlobClient should have comment or be unexported (revive)
internal/gitaly/blob.go:18:1: exported: exported method BlobClient.SendBlob should have comment or be unexported (revive)
internal/gitaly/blob.go:1:1: package-comments: should have a package comment (revive)
internal/gitaly/diff.go:13:6: exported: exported type DiffClient should have comment or be unexported (revive)
internal/gitaly/diff.go:17: 17-35 lines are duplicate of `internal/gitaly/diff.go:37-55` (dupl)
internal/gitaly/diff.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
internal/gitaly/diff.go:37: 37-55 lines are duplicate of `internal/gitaly/diff.go:17-35` (dupl)
internal/gitaly/gitaly.go:106:1: exported: exported function NewRepositoryClient should have comment or be unexported (revive)
internal/gitaly/gitaly.go:115:1: exported: exported function NewDiffClient should have comment or be unexported (revive)
internal/gitaly/gitaly.go:138:5: shadow: declaration of "conn" shadows declaration at line 128 (govet)
internal/gitaly/gitaly.go:152:1: exported: exported function CloseConnections should have comment or be unexported (revive)
internal/gitaly/gitaly.go:157:13: Error return value of `conn.Close` is not checked (errcheck)
internal/gitaly/gitaly.go:162:14: appendAssign: append result not assigned to the same slice (gocritic)
internal/gitaly/gitaly.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
internal/gitaly/gitaly.go:202:1: exported: exported function UnmarshalJSON should have comment or be unexported (revive)
internal/gitaly/gitaly.go:62:1: exported: exported function InitializeSidechannelRegistry should have comment or be unexported (revive)
internal/gitaly/gitaly.go:84:1: exported: exported function NewSmartHTTPClient should have comment or be unexported (revive)
internal/gitaly/gitaly.go:97:1: exported: exported function NewBlobClient should have comment or be unexported (revive)
internal/gitaly/gitaly_test.go:58:41: context-as-argument: context.Context should be the first parameter of a function (revive)
internal/gitaly/repository.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
internal/gitaly/smarthttp.go:113:20: Error return value of `waiter.Close` is not checked (errcheck)
internal/gitaly/smarthttp.go:13:6: exported: exported type SmartHTTPClient should have comment or be unexported (revive)
internal/gitaly/smarthttp.go:18:1: exported: exported method SmartHTTPClient.InfoRefsResponseReader should have comment or be unexported (revive)
internal/gitaly/smarthttp.go:1:1: ST1000: at least one file in a package should have a package comment (stylecheck)
internal/gitaly/smarthttp.go:48:92: var-naming: method parameter glId should be glID (revive)
internal/gitaly/smarthttp.go:84:19: Error return value of `stream.CloseSend` is not checked (errcheck)
internal/gitaly/smarthttp.go:97:1: exported: exported method SmartHTTPClient.UploadPack should have comment or be unexported (revive)
Solution
Resolve warnings
Edited by Vasilii Iakliushin