fix: add golangci-lint setup action and fix lint issue (#592)
Co-authored-by: Neemias Almeida <ndalmeida@bol.com>
This commit is contained in:
@@ -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
@@ -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
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user