File tree Expand file tree Collapse file tree 8 files changed +103
-103
lines changed
Expand file tree Collapse file tree 8 files changed +103
-103
lines changed Original file line number Diff line number Diff line change 1+ version : " 2"
12run :
2- timeout : 10m
33 allow-serial-runners : true
4- concurrency : 0
5- linters-settings :
6- goimports :
7- local-prefixes : github.com/theopenlane/httpsling
8- gofumpt :
9- extra-rules : true
10- gosec :
11- exclude-generated : true
12- revive :
13- ignore-generated-header : true
144linters :
155 enable :
166 - bodyclose
17- - errcheck
7+ - err113
188 - gocritic
199 - gocyclo
20- - err113
21- - gofmt
22- - goimports
23- - mnd
24- - gosimple
25- - govet
2610 - gosec
27- - ineffassign
2811 - misspell
12+ - mnd
2913 - noctx
3014 - revive
3115 - staticcheck
32- - stylecheck
33- - typecheck
34- - unused
3516 - whitespace
3617 - wsl
18+ exclusions :
19+ generated : lax
20+ presets :
21+ - comments
22+ - common-false-positives
23+ - legacy
24+ - std-error-handling
25+ paths :
26+ - example_test.go
27+ - httptestutil/*
28+ - third_party$
29+ - builtin$
30+ - examples$
31+ - _test.go$
32+ - mocks.go
3733issues :
3834 fix : true
39- exclude-use-default : true
40- exclude-dirs :
41- - httptestutil/*
42- exclude-files :
43- - example_test.go
35+ formatters :
36+ enable :
37+ - gofmt
38+ - goimports
39+ settings :
40+ gofumpt :
41+ extra-rules : true
42+ goimports :
43+ local-prefixes :
44+ - github.com/theopenlane/httpsling
Original file line number Diff line number Diff line change 1010 go:lint :
1111 desc : runs golangci-lint, the most annoying opinionated linter ever
1212 cmds :
13- - golangci-lint run --config=.golangci.yaml --verbose --fast -- fix
13+ - golangci-lint run --config=.golangci.yaml --verbose --fix
1414
1515 go:fmt :
1616 desc : format all go code
Original file line number Diff line number Diff line change @@ -6,8 +6,7 @@ require (
66 github.com/felixge/httpsnoop v1.0.4
77 github.com/google/go-querystring v1.1.0
88 github.com/stretchr/testify v1.10.0
9- github.com/theopenlane/utils v0.4.3
10-
9+ github.com/theopenlane/utils v0.4.4
1110)
1211
1312require (
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf
1515github.com/stretchr/testify v1.10.0 /go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY =
1616github.com/theopenlane/echox v0.2.1 h1:ZhVkimmWxpKITf67oM57SrLWeIdnV8+dNXlC+VzlRaQ =
1717github.com/theopenlane/echox v0.2.1 /go.mod h1:4j/Hx0uoLk5gVzdA83Qqz7xBEmqpoEP+OnzVaw2p6/o =
18- github.com/theopenlane/utils v0.4.3 h1:0ZSqUzbbQt7lczLTIXlbYXOwLuKuQns//L2AHQOZdis =
19- github.com/theopenlane/utils v0.4.3 /go.mod h1:UTzPMpvyCu35eGium50H7KroHU0+2mh1lMOYTb4Vi70 =
18+ github.com/theopenlane/utils v0.4.4 h1:4Xb2T+4bjMtf4OL73bWQ1a8zllTt43ryVflRzVaUgmU =
19+ github.com/theopenlane/utils v0.4.4 /go.mod h1:lNzPjqQoDM5565s5FRqkmBGO77twAkY3Hxgd38ESo6I =
2020go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU =
2121go.uber.org/mock v0.5.0 /go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM =
2222golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0 =
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
1111// NoRedirects configures the client to no perform any redirects
1212func NoRedirects () Option {
1313 return OptionFunc (func (client * http.Client ) error {
14- client .CheckRedirect = func (req * http.Request , via []* http.Request ) error {
14+ client .CheckRedirect = func (_ * http.Request , _ []* http.Request ) error {
1515 return http .ErrUseLastResponse
1616 }
1717
@@ -20,10 +20,10 @@ func NoRedirects() Option {
2020}
2121
2222// MaxRedirects configures the max number of redirects the client will perform before giving up
23- func MaxRedirects (max int ) Option {
23+ func MaxRedirects (m int ) Option {
2424 return OptionFunc (func (client * http.Client ) error {
25- client .CheckRedirect = func (req * http.Request , via []* http.Request ) error {
26- if len (via ) >= max {
25+ client .CheckRedirect = func (_ * http.Request , via []* http.Request ) error {
26+ if len (via ) >= m {
2727 return ErrMaxAttemptsExceeded
2828 }
2929
@@ -56,7 +56,7 @@ func ProxyURL(proxyURL string) Option {
5656 return err
5757 }
5858
59- t .Proxy = func (request * http.Request ) (* url.URL , error ) {
59+ t .Proxy = func (_ * http.Request ) (* url.URL , error ) {
6060 return u , nil
6161 }
6262
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ func TestInspectNilhandler(t *testing.T) {
207207 require .NotNil (t , i .LastExchange ())
208208}
209209
210- func ExampleInspectorNextExchange () {
210+ func ExampleInspector_NextExchange () {
211211 i := NewInspector (0 )
212212
213213 var h http.Handler = http .HandlerFunc (func (writer http.ResponseWriter , request * http.Request ) {
@@ -232,7 +232,7 @@ func ExampleInspectorNextExchange() {
232232 // <nil>
233233}
234234
235- func ExampleInspectorLastExchange () {
235+ func ExampleInspector_LastExchange () {
236236 i := NewInspector (0 )
237237
238238 var h http.Handler = http .HandlerFunc (func (writer http.ResponseWriter , request * http.Request ) {
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ func TestFormMarshalerMarshal(t *testing.T) {
174174}
175175
176176func TestMarshalFuncApply (t * testing.T ) {
177- var mf MarshalFunc = func (v interface {}) (bytes []byte , s string , e error ) {
177+ var mf MarshalFunc = func (_ interface {}) (bytes []byte , s string , e error ) {
178178 return nil , "red" , nil
179179 }
180180
You can’t perform that action at this time.
0 commit comments