Skip to content

Commit

Permalink
use golangci-lint 1.61
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc committed Sep 20, 2024
1 parent bd8613f commit 494123a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,11 @@ jobs:
make build
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.56
version: v1.61
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false
# the cache is already managed above, enabling it here
# gives errors when extracting
skip-pkg-cache: true
skip-build-cache: true

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ linters:

- gomnd # An analyzer to detect magic numbers.
- ireturn # Accept Interfaces, Return Concrete Types
- mnd # An analyzer to detect magic numbers.
- unparam # Reports unused function parameters

#
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func buildCommonLogLine(req *http.Request, url url.URL, ts time.Time, status int
// Requests using the CONNECT method over HTTP/2.0 must use
// the authority field (aka r.Host) to identify the target.
// Refer: https://httpwg.github.io/specs/rfc7540.html#CONNECT
if req.ProtoMajor == 2 && req.Method == "CONNECT" {
if req.ProtoMajor == 2 && req.Method == http.MethodConnect {
uri = req.Host
}

Expand Down

0 comments on commit 494123a

Please sign in to comment.