run go fix

This commit is contained in:
Patricio Whittingslow
2026-07-28 23:11:25 -03:00
parent 29c0d2a008
commit 564f277962
+3 -4
View File
@@ -4,6 +4,7 @@ import (
"context" "context"
"errors" "errors"
"io" "io"
"slices"
"strconv" "strconv"
"strings" "strings"
@@ -958,10 +959,8 @@ func serveMultipart(t *testing.T, request string, bufSize int, discard []string,
sm.Reset(1) sm.Reset(1)
sm.Handle("/f", func(exch *Exchange) { sm.Handle("/f", func(exch *Exchange) {
newSink := func(hdr *httpraw.MultipartHeader) io.WriteCloser { newSink := func(hdr *httpraw.MultipartHeader) io.WriteCloser {
for _, name := range discard { if slices.Contains(discard, string(hdr.Name)) {
if string(hdr.Name) == name { return nil // Discard this part's content.
return nil // Discard this part's content.
}
} }
return new(partBuffer) return new(partBuffer)
} }