From 88b281ae476bb7f93e84c501d86bb4fa31e0454a Mon Sep 17 00:00:00 2001 From: linchizhen Date: Sun, 1 Sep 2024 16:41:01 +0800 Subject: [PATCH] chore: fix some function names in comment (#5586) Signed-off-by: linchizhen --- cmd/tmc/main.go | 2 +- pkg/input/formats/openapi/generator.go | 2 +- pkg/input/provider/interface.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/tmc/main.go b/cmd/tmc/main.go index 5cb38afbe..a5971ca19 100644 --- a/cmd/tmc/main.go +++ b/cmd/tmc/main.go @@ -300,7 +300,7 @@ func formatTemplate(data string) (string, bool, error) { return data, false, errorutil.New("template format failed") } -// lintTemplateData lints template data using templateman lint api +// lintTemplate lints template data using templateman lint api func lintTemplate(data string) (bool, error) { resp, err := retryablehttp.DefaultClient().Post(fmt.Sprintf("%s/lint", tmBaseUrl), "application/x-yaml", strings.NewReader(data)) if err != nil { diff --git a/pkg/input/formats/openapi/generator.go b/pkg/input/formats/openapi/generator.go index 4027d76fc..63fef7e29 100644 --- a/pkg/input/formats/openapi/generator.go +++ b/pkg/input/formats/openapi/generator.go @@ -416,7 +416,7 @@ schemaLabel: return globalParams, nil } -// generateExampleFromSchema generates an example from a schema object +// GenerateParameterFromSecurityScheme generates an example from a schema object func GenerateParameterFromSecurityScheme(scheme *openapi3.SecuritySchemeRef) (*openapi3.Parameter, error) { if !generic.EqualsAny(scheme.Value.Type, "http", "apiKey") { return nil, errorutil.NewWithTag("openapi", "unsupported security scheme type (%s) found in openapi file", scheme.Value.Type) diff --git a/pkg/input/provider/interface.go b/pkg/input/provider/interface.go index b7ad4b448..e6d5da14a 100644 --- a/pkg/input/provider/interface.go +++ b/pkg/input/provider/interface.go @@ -121,7 +121,7 @@ func NewInputProvider(opts InputOptions) (InputProvider, error) { } } -// SupportedFormats returns all supported input formats of nuclei +// SupportedInputFormats returns all supported input formats of nuclei func SupportedInputFormats() string { return "list, " + http.SupportedFormats() }