From e96fdf2e401b9cc49c05db465cf47a58592a20f3 Mon Sep 17 00:00:00 2001 From: Anna Smith <155628741+socialsister@users.noreply.github.com> Date: Sat, 27 Apr 2024 21:10:33 +0800 Subject: [PATCH] chore: fix function names in comment (#5110) --- lib/config.go | 2 +- lib/multi.go | 2 +- pkg/authprovider/authx/file.go | 2 +- pkg/catalog/config/nucleiconfig.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/config.go b/lib/config.go index a453fb74c..5610b7151 100644 --- a/lib/config.go +++ b/lib/config.go @@ -394,7 +394,7 @@ func EnablePassiveMode() NucleiSDKOptions { } } -// WithAuthOptions allows setting a custom authprovider implementation +// WithAuthProvider allows setting a custom authprovider implementation func WithAuthProvider(provider authprovider.AuthProvider) NucleiSDKOptions { return func(e *NucleiEngine) error { e.authprovider = provider diff --git a/lib/multi.go b/lib/multi.go index bdcee7967..d6806d969 100644 --- a/lib/multi.go +++ b/lib/multi.go @@ -95,7 +95,7 @@ func (e *ThreadSafeNucleiEngine) GlobalResultCallback(callback func(event *outpu e.eng.resultCallbacks = []func(*output.ResultEvent){callback} } -// ExecuteWithCallback executes templates on targets and calls callback on each result(only if results are found) +// ExecuteNucleiWithOpts executes templates on targets and calls callback on each result(only if results are found) // This method can be called concurrently and it will use some global resources but can be runned parallelly // by invoking this method with different options and targets // Note: Not all options are thread-safe. this method will throw error if you try to use non-thread-safe options diff --git a/pkg/authprovider/authx/file.go b/pkg/authprovider/authx/file.go index 698aafe80..adaca5390 100644 --- a/pkg/authprovider/authx/file.go +++ b/pkg/authprovider/authx/file.go @@ -219,7 +219,7 @@ func GetAuthDataFromFile(file string) (*Authx, error) { return GetAuthDataFromJSON(bin) } -// GetTemplateIDsFromSecretFile reads the template IDs from the secret file +// GetTemplatePathsFromSecretFile reads the template IDs from the secret file func GetTemplatePathsFromSecretFile(file string) ([]string, error) { auth, err := GetAuthDataFromFile(file) if err != nil { diff --git a/pkg/catalog/config/nucleiconfig.go b/pkg/catalog/config/nucleiconfig.go index 5ff7e8c5d..619d7fd47 100644 --- a/pkg/catalog/config/nucleiconfig.go +++ b/pkg/catalog/config/nucleiconfig.go @@ -166,12 +166,12 @@ func (c *Config) GetTemplateIndexFilePath() string { return filepath.Join(c.TemplatesDirectory, NucleiTemplatesIndexFileName) } -// GetTemplatesConfigFilePath returns checksum file path of nuclei templates +// GetChecksumFilePath returns checksum file path of nuclei templates func (c *Config) GetChecksumFilePath() string { return filepath.Join(c.TemplatesDirectory, NucleiTemplatesCheckSumFileName) } -// GetCLIOptsConfigFilePath returns the nuclei cli config file path +// GetFlagsConfigFilePath returns the nuclei cli config file path func (c *Config) GetFlagsConfigFilePath() string { return filepath.Join(c.configDir, CLIConfigFileName) }