mirror of
https://github.com/soypat/lneto.git
synced 2026-09-03 05:19:04 +00:00
run go fix
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user