Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav committed Nov 10, 2023
1 parent 93ae997 commit acbf6db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,14 @@ func TestCustomTemplates(t *testing.T) {
}
delete(templatesText, name)

var err error
var templates *template.Template = template.New("")
templates := template.New("")
for tplName, tplText := range templatesText {
var err error
templates, err = templates.New(tplName).Parse(tplText)
require.NoError(t, err)
}

_, err = CreateHandler(&Config{}, templates)
_, err := CreateHandler(&Config{}, templates)
require.Error(t, err, name)
}
})
Expand Down
2 changes: 1 addition & 1 deletion utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func getTestTemplates(tb testing.TB, overrideTemplates map[string]string) *templ

templatesDir := tb.TempDir() // This is automatically removed at the end of the test.
for name, content := range overrideTemplates {
err := os.WriteFile(filepath.Join(templatesDir, name), []byte(content), 0666)
err := os.WriteFile(filepath.Join(templatesDir, name), []byte(content), 0o666)
require.NoError(tb, err)
}

Expand Down

0 comments on commit acbf6db

Please sign in to comment.