feat: use SplitSeq

This commit is contained in:
2025-11-14 07:16:20 +01:00
parent 9dfef1d67f
commit 69e61c5811

View File

@@ -123,8 +123,8 @@ type HTTPFuzzTestCase struct {
} }
func (h *FuzzTestHelper) validateHTTPRequest(t *testing.T, req *http.Request) { func (h *FuzzTestHelper) validateHTTPRequest(t *testing.T, req *http.Request) {
pathParts := strings.Split(req.URL.Path, "/") pathParts := strings.SplitSeq(req.URL.Path, "/")
for _, part := range pathParts { for part := range pathParts {
if !utf8.ValidString(part) { if !utf8.ValidString(part) {
t.Fatal("Path contains invalid UTF-8") t.Fatal("Path contains invalid UTF-8")
} }