File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ func TestLoadHTTPBytes(t *testing.T) {
47
47
_ , err = swag .LoadFromFileOrHTTP (serv .URL )
48
48
require .Error (t , err )
49
49
50
- ts2 := httptest .NewServer (http .HandlerFunc (func (rw http.ResponseWriter , r * http.Request ) {
50
+ ts2 := httptest .NewServer (http .HandlerFunc (func (rw http.ResponseWriter , _ * http.Request ) {
51
51
rw .WriteHeader (http .StatusOK )
52
52
_ , _ = rw .Write ([]byte ("the content" ))
53
53
}))
@@ -129,10 +129,10 @@ name: a string value
129
129
}
130
130
131
131
func TestLoadStrategy (t * testing.T ) {
132
- loader := func (p string ) ([]byte , error ) {
132
+ loader := func (_ string ) ([]byte , error ) {
133
133
return []byte (yamlPetStore ), nil
134
134
}
135
- remLoader := func (p string ) ([]byte , error ) {
135
+ remLoader := func (_ string ) ([]byte , error ) {
136
136
return []byte ("not it" ), nil
137
137
}
138
138
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ func TestLoadJSON(t *testing.T) {
30
30
require .NoError (t , err )
31
31
require .NotNil (t , s )
32
32
33
- ts2 := httptest .NewServer (http .HandlerFunc (func (rw http.ResponseWriter , r * http.Request ) {
33
+ ts2 := httptest .NewServer (http .HandlerFunc (func (rw http.ResponseWriter , _ * http.Request ) {
34
34
rw .WriteHeader (http .StatusNotFound )
35
35
_ , _ = rw .Write ([]byte ("{}" ))
36
36
}))
@@ -39,7 +39,7 @@ func TestLoadJSON(t *testing.T) {
39
39
require .Error (t , err )
40
40
}
41
41
42
- var jsonPestoreServer = func (rw http.ResponseWriter , r * http.Request ) {
42
+ var jsonPestoreServer = func (rw http.ResponseWriter , _ * http.Request ) {
43
43
rw .WriteHeader (http .StatusOK )
44
44
_ , _ = rw .Write ([]byte (petstoreJSON ))
45
45
}
Original file line number Diff line number Diff line change 21
21
func init () {
22
22
jsonLoader := & loader {
23
23
DocLoaderWithMatch : DocLoaderWithMatch {
24
- Match : func (pth string ) bool {
24
+ Match : func (_ string ) bool {
25
25
return true
26
26
},
27
27
Fn : JSONDoc ,
You can’t perform that action at this time.
0 commit comments