From 52862cde68c54af29717e0be3a20bdcce8b67701 Mon Sep 17 00:00:00 2001 From: Auto PR Bot Date: Fri, 12 Jun 2026 05:02:11 +0800 Subject: [PATCH] Improve code quality: auto-pr/docstrings-1781211731 --- pkg/xpkg/parser/fuzz_test.go | 41 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/pkg/xpkg/parser/fuzz_test.go b/pkg/xpkg/parser/fuzz_test.go index a0cfe0a6f..16eee3a63 100644 --- a/pkg/xpkg/parser/fuzz_test.go +++ b/pkg/xpkg/parser/fuzz_test.go @@ -1,20 +1,21 @@ -package parser - -import ( - "bytes" - "context" - "io" - "testing" - - "k8s.io/apimachinery/pkg/runtime" -) - -func FuzzParse(f *testing.F) { - f.Fuzz(func(_ *testing.T, data []byte) { - objScheme := runtime.NewScheme() - metaScheme := runtime.NewScheme() - p := New(metaScheme, objScheme) - r := io.NopCloser(bytes.NewReader(data)) - _, _ = p.Parse(context.Background(), r) - }) -} +package parser + +import ( + "bytes" + "context" + "io" + "testing" + + "k8s.io/apimachinery/pkg/runtime" +) + +// FuzzParse is a fuzz test function used to test the robustness of the parser. +func FuzzParse(f *testing.F) { + f.Fuzz(func(_ *testing.T, data []byte) { + objScheme := runtime.NewScheme() + metaScheme := runtime.NewScheme() + p := New(metaScheme, objScheme) + r := io.NopCloser(bytes.NewReader(data)) + _, _ = p.Parse(context.Background(), r) + }) +}