From 9f08fe21d8cc271d9b6f611facaeea80cc66b2fd Mon Sep 17 00:00:00 2001 From: fudancoder Date: Mon, 22 Jul 2024 16:59:35 +0800 Subject: [PATCH] chore: fix some comments (#5432) Signed-off-by: fudancoder --- pkg/testutils/integration.go | 2 +- pkg/types/types.go | 2 +- pkg/utils/utils.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/testutils/integration.go b/pkg/testutils/integration.go index c8a67e41c..49eda2962 100644 --- a/pkg/testutils/integration.go +++ b/pkg/testutils/integration.go @@ -162,7 +162,7 @@ func RunNucleiArgsAndGetErrors(debug bool, env []string, extra ...string) ([]str return results, err } -// RunNucleiArgsWithEnvAndGetErrors returns a list of errors in nuclei output (ERR,WRN,FTL) +// RunNucleiArgsWithEnvAndGetResults returns a list of results in nuclei output (ERR,WRN,FTL) func RunNucleiArgsWithEnvAndGetResults(debug bool, env []string, extra ...string) ([]string, error) { cmd := exec.Command("./nuclei") extra = append(extra, ExtraDebugArgs...) diff --git a/pkg/types/types.go b/pkg/types/types.go index 48e9039d3..9d05a0b74 100644 --- a/pkg/types/types.go +++ b/pkg/types/types.go @@ -592,7 +592,7 @@ func (o *Options) GetValidAbsPath(helperFilePath, templatePath string) (string, return "", errorutil.New("access to helper file %v denied", helperFilePath) } -// isRootDir checks if given is root directory +// isHomeDir checks if given is home directory func isHomeDir(path string) bool { homeDir := folderutil.HomeDirOrDefault("") return strings.HasPrefix(path, homeDir) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index dfe37ae99..9a8c669f9 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -35,7 +35,7 @@ func IsURL(input string) bool { return err == nil && u.Scheme != "" && u.Host != "" } -// ReadFromPathOrURL reads and returns the contents of a file or url. +// ReaderFromPathOrURL reads and returns the contents of a file or url. func ReaderFromPathOrURL(templatePath string, catalog catalog.Catalog) (io.ReadCloser, error) { if IsURL(templatePath) { resp, err := retryablehttp.DefaultClient().Get(templatePath)