fix: add golangci-lint setup action and fix lint issue (#592)

Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
This commit is contained in:
Neemias
2024-05-28 11:21:09 +02:00
committed by GitHub
parent f6733207ad
commit e3b6eafe8a
2 changed files with 7 additions and 4 deletions
+6 -3
View File
@@ -20,11 +20,14 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ^1.22
- name: Build
run: make build
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
- name: Install dependency
run: if [ $(uname) == "Darwin" ]; then brew install gnu-sed ;fi
- name: Build
run: make build
- name: Run unit tests
run: go install github.com/go-delve/delve/cmd/dlv@latest && go test ./... -v -covermode=count -coverprofile=coverage.txt
- name: Upload Coverage report to CodeCov
+1 -1
View File
@@ -34,7 +34,7 @@ func NewProxy(cfg *cfgProxy) *Proxy {
Addr: fmt.Sprintf(":%d", cfg.ProxyPort),
},
client: &http.Client{
CheckRedirect: func(req *http.Request, via []*http.Request) error {
CheckRedirect: func(_ *http.Request, _ []*http.Request) error {
return http.ErrUseLastResponse
},
},