chore: fix some comments (#5432)

Signed-off-by: fudancoder <fudancoder@icloud.com>
This commit is contained in:
fudancoder
2024-07-22 16:59:35 +08:00
committed by GitHub
parent 33464a39c7
commit 9f08fe21d8
3 changed files with 3 additions and 3 deletions

View File

@@ -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...)

View File

@@ -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)

View File

@@ -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)