Skip to content

Commit

Permalink
chore(lint): relinted
Browse files Browse the repository at this point in the history
Signed-off-by: Frederic BIDON <[email protected]>
  • Loading branch information
fredbi committed Mar 4, 2024
1 parent 2d81244 commit 48949e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions fmts/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestLoadHTTPBytes(t *testing.T) {
_, err = swag.LoadFromFileOrHTTP(serv.URL)
require.Error(t, err)

ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) {
rw.WriteHeader(http.StatusOK)
_, _ = rw.Write([]byte("the content"))
}))
Expand Down Expand Up @@ -129,10 +129,10 @@ name: a string value
}

func TestLoadStrategy(t *testing.T) {
loader := func(p string) ([]byte, error) {
loader := func(_ string) ([]byte, error) {
return []byte(yamlPetStore), nil
}
remLoader := func(p string) ([]byte, error) {
remLoader := func(_ string) ([]byte, error) {
return []byte("not it"), nil
}

Expand Down
4 changes: 2 additions & 2 deletions json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestLoadJSON(t *testing.T) {
require.NoError(t, err)
require.NotNil(t, s)

ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
ts2 := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) {
rw.WriteHeader(http.StatusNotFound)
_, _ = rw.Write([]byte("{}"))
}))
Expand All @@ -39,7 +39,7 @@ func TestLoadJSON(t *testing.T) {
require.Error(t, err)
}

var jsonPestoreServer = func(rw http.ResponseWriter, r *http.Request) {
var jsonPestoreServer = func(rw http.ResponseWriter, _ *http.Request) {
rw.WriteHeader(http.StatusOK)
_, _ = rw.Write([]byte(petstoreJSON))
}
Expand Down
2 changes: 1 addition & 1 deletion loaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var (
func init() {
jsonLoader := &loader{
DocLoaderWithMatch: DocLoaderWithMatch{
Match: func(pth string) bool {
Match: func(_ string) bool {
return true
},
Fn: JSONDoc,
Expand Down

0 comments on commit 48949e8

Please sign in to comment.