Fix Workhorse linter warnings (part 4)
Problem
make golangci
linter detects warnings in following Workhorse files
How to verify
make golangci | grep -E "^gitaly_test"
gitaly_test.go:102:25: response body must be closed (bodyclose)
gitaly_test.go:121:27: unnecessary conversion (unconvert)
gitaly_test.go:555:17: string `default` has 8 occurrences, make it a constant (goconst)
gitaly_test.go:556:17: string `e395f646b1499e8e0279445fc99a0596a65fab7e` has 4 occurrences, make it a constant (goconst)
gitaly_test.go:557:16: string `8a0f2ee90d940bfb0ba1e14e8214b0649056e4ab` has 4 occurrences, make it a constant (goconst)
gitaly_test.go:558:22: string `foo/bar.git` has 7 occurrences, make it a constant (goconst)
gitaly_test.go:563:38: response body must be closed (bodyclose)
gitaly_test.go:583:38: response body must be closed (bodyclose)
gitaly_test.go:58:19: string `unix:` has 18 occurrences, make it a constant (goconst)
gitaly_test.go:596:9: string `54fcc214b94e78d7a41a9a8fe6d87a5e59500e51` has 3 occurrences, make it a constant (goconst)
gitaly_test.go:639:39: response body must be closed (bodyclose)
gitaly_test.go:644:3: len: use require.Len (testifylint)
gitaly_test.go:748:38: response body must be closed (bodyclose)
gitaly_test.go:753:2: len: use require.Len (testifylint)
gitaly_test.go:796:66: `behaviour` is a misspelling of `behavior` (misspell)
gitaly_test.go:82:3: var-naming: struct field gitRpc should be gitRPC (revive)
gitaly_test.go:856:5: shadow: declaration of "err" shadows declaration at line 849 (govet)
Solution
Resolve warnings
Edited by Vasilii Iakliushin