chore: apply golangci-lint fmt

This commit is contained in:
yusing
2026-02-21 12:56:51 +08:00
parent ee973f7997
commit dea37a437b
14 changed files with 57 additions and 45 deletions

View File

@@ -523,11 +523,11 @@ func TestHTTPFlow_ServeCommand(t *testing.T) {
// The path /files/index.html gets mapped to tempDir + "/files/index.html"
// We need to create the file at the expected path
filesDir := filepath.Join(tempDir, "files")
err = os.Mkdir(filesDir, 0755)
err = os.Mkdir(filesDir, 0o755)
require.NoError(t, err)
filesIndexFile := filepath.Join(filesDir, "index.html")
err = os.WriteFile(filesIndexFile, []byte("<h1>Test Page</h1>"), 0644)
err = os.WriteFile(filesIndexFile, []byte("<h1>Test Page</h1>"), 0o644)
require.NoError(t, err)
req1 := httptest.NewRequest(http.MethodGet, "/files/index.html", nil)

View File

@@ -46,7 +46,7 @@ func BenchmarkRules(b *testing.B) {
})
b.Run("RunHandler", func(b *testing.B) {
var r = &http.Request{
r := &http.Request{
Body: io.NopCloser(bytes.NewReader([]byte(""))),
URL: &url.URL{Path: "/api/users/"},
}
@@ -59,8 +59,7 @@ func BenchmarkRules(b *testing.B) {
})
}
type noopResponseWriter struct {
}
type noopResponseWriter struct{}
func (w noopResponseWriter) Header() http.Header {
return http.Header{}