mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-24 02:35:25 +00:00
refactor: godoc and comment uniformization
Adding space after // and before the godoc/comment
This commit is contained in:
parent
c8d009654c
commit
3fd1f57b96
@ -40,7 +40,7 @@ var httpTestcases = map[string]testutils.TestCase{
|
||||
|
||||
type httpInteractshRequest struct{}
|
||||
|
||||
// Executes executes a test case and returns an error if occurred
|
||||
// Execute executes a test case and returns an error if occurred
|
||||
func (h *httpInteractshRequest) Execute(filePath string) error {
|
||||
router := httprouter.New()
|
||||
router.GET("/", httprouter.Handle(func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||
|
||||
@ -9,6 +9,7 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
|
||||
"github.com/projectdiscovery/fileutil"
|
||||
"github.com/projectdiscovery/gologger"
|
||||
"github.com/projectdiscovery/gologger/formatter"
|
||||
@ -93,7 +94,7 @@ func validateOptions(options *types.Options) error {
|
||||
if options.Verbose && options.Silent {
|
||||
return errors.New("both verbose and silent mode specified")
|
||||
}
|
||||
//loading the proxy server list from file or cli and test the connectivity
|
||||
// loading the proxy server list from file or cli and test the connectivity
|
||||
if err := loadProxyServers(options); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ func validateProxyURL(proxy string) (url.URL, error) {
|
||||
return url.URL{}, errors.New("invalid proxy format (It should be http[s]/socks5://[username:password@]host:port)")
|
||||
}
|
||||
|
||||
//isSupportedProtocol checks given protocols are supported
|
||||
// isSupportedProtocol checks given protocols are supported
|
||||
func isSupportedProtocol(value string) bool {
|
||||
return value == types.HTTP || value == types.HTTPS || value == types.SOCKS5
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ const (
|
||||
XPathExtractor
|
||||
// JSONExtractor extracts responses with json
|
||||
JSONExtractor
|
||||
//limit
|
||||
limit
|
||||
)
|
||||
|
||||
|
||||
@ -24,7 +24,6 @@ const (
|
||||
SizeMatcher
|
||||
// DSLMatcher matches based upon dsl syntax
|
||||
DSLMatcher
|
||||
//limit
|
||||
limit
|
||||
)
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/bluele/gcache"
|
||||
|
||||
"github.com/projectdiscovery/gologger"
|
||||
)
|
||||
|
||||
@ -16,7 +17,7 @@ import (
|
||||
// It uses an LRU cache internally for skipping unresponsive hosts
|
||||
// that remain so for a duration.
|
||||
type Cache struct {
|
||||
MaxHostError int
|
||||
MaxHostError int
|
||||
verbose bool
|
||||
failedTargets gcache.Cache
|
||||
}
|
||||
@ -64,7 +65,7 @@ func (c *Cache) normalizeCacheValue(value string) string {
|
||||
}
|
||||
|
||||
// ErrUnresponsiveHost is returned when a host is unresponsive
|
||||
//var ErrUnresponsiveHost = errors.New("skipping as host is unresponsive")
|
||||
// var ErrUnresponsiveHost = errors.New("skipping as host is unresponsive")
|
||||
|
||||
// Check returns true if a host should be skipped as it has been
|
||||
// unresponsive for a certain number of times.
|
||||
|
||||
@ -21,7 +21,6 @@ const (
|
||||
MX
|
||||
TXT
|
||||
AAAA
|
||||
//limit
|
||||
limit
|
||||
)
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ const (
|
||||
HTTPTrace
|
||||
HTTPPatch
|
||||
HTTPPurge
|
||||
//limit
|
||||
limit
|
||||
)
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ type NetworkInputType int
|
||||
const (
|
||||
hexType NetworkInputType = iota + 1
|
||||
textType
|
||||
//limit
|
||||
limit
|
||||
)
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@ import (
|
||||
"go.uber.org/ratelimit"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
|
||||
"github.com/projectdiscovery/gologger/levels"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/catalog"
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/model"
|
||||
@ -131,7 +132,7 @@ func (m *MockOutputWriter) Request(templateID, url, requestType string, err erro
|
||||
}
|
||||
}
|
||||
|
||||
// Write writes the event to file and/or screen.
|
||||
// WriteFailure writes the event to file and/or screen.
|
||||
func (m *MockOutputWriter) WriteFailure(result output.InternalEvent) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user