mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 01:08:31 +02:00
chore: apply golangci-lint fmt
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user