Skip to content

Commit

Permalink
chore: fix linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <piashchynski.valery@gmail.com>
  • Loading branch information
rustatian committed Mar 28, 2024
1 parent 66839bd commit 927d84b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
10 changes: 5 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

run:
timeout: 1m
skip-dirs:
- .github
- .git
allow-parallel-runners: true

output:
format: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate
formats: colored-line-number # colored-line-number|line-number|json|tab|checkstyle|code-climate

linters-settings:
wsl:
allow-assign-and-anything: true
govet:
check-shadowing: true
shadow: true
golint:
min-confidence: 0.1
gocyclo:
Expand Down Expand Up @@ -78,6 +75,9 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
- whitespace # Tool for detection of leading and trailing whitespace

issues:
exclude-dirs:
- .github
- .git
exclude-rules:
- path: _test\.go
linters:
Expand Down
1 change: 1 addition & 0 deletions go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,7 @@ google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp4
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY=
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
google.golang.org/genproto v0.0.0-20240228224816-df926f6c8641 h1:GihpvzHjeZHw+/mzsWpdxwr1LaG6E3ff/gyeZlVHbyc=
google.golang.org/genproto v0.0.0-20240228224816-df926f6c8641/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo=
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ=
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk=
Expand Down
18 changes: 0 additions & 18 deletions handler/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package handler

import (
"net/http"
"net/textproto"

httpV1proto "github.com/roadrunner-server/api/v4/build/http/v1"
)
Expand Down Expand Up @@ -41,20 +40,3 @@ func convertCookies(headers map[string]string) map[string]*httpV1proto.HeaderVal

return resp
}

func convertMimeHeader(headers textproto.MIMEHeader) map[string]*httpV1proto.HeaderValue {
if len(headers) == 0 {
return nil
}

resp := make(map[string]*httpV1proto.HeaderValue)

for k, v := range headers {
if resp[k] == nil {
resp[k] = &httpV1proto.HeaderValue{}
}
resp[k].Value = append(resp[k].Value, v...)
}

return resp
}

0 comments on commit 927d84b

Please sign in to comment.