feat: use SplitSeq
This commit is contained in:
@@ -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")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user