mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 07:57:05 +00:00
RES-84 # Improve Nuclei CLI interface (WIP)
* Pleasing the linter
This commit is contained in:
parent
d3154648d2
commit
138745a6b1
@ -2,10 +2,10 @@ package model
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/projectdiscovery/nuclei/v2/pkg/utils"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/projectdiscovery/nuclei/v2/internal/severity"
|
"github.com/projectdiscovery/nuclei/v2/internal/severity"
|
||||||
|
"github.com/projectdiscovery/nuclei/v2/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Info struct {
|
type Info struct {
|
||||||
@ -47,6 +47,7 @@ func (stringSlice *StringSlice) UnmarshalYAML(unmarshal func(interface{}) error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
result := make([]string, len(marshalledSlice))
|
result := make([]string, len(marshalledSlice))
|
||||||
|
//nolint:gosimple,nolintlint //cannot be replaced with result = append(result, slices...) because the values are being normalized
|
||||||
for _, value := range marshalledSlice {
|
for _, value := range marshalledSlice {
|
||||||
result = append(result, strings.ToLower(strings.TrimSpace(value))) // TODO do we need to introduce RawStringSlice and/or NormalizedStringSlices?
|
result = append(result, strings.ToLower(strings.TrimSpace(value))) // TODO do we need to introduce RawStringSlice and/or NormalizedStringSlices?
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ func isInfoMetadataMatch(tagFilter *filter.TagFilter, templateInfo *model.Info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
func validateMandatoryInfoFields(info *model.Info) error {
|
func validateMandatoryInfoFields(info *model.Info) error {
|
||||||
if &info == nil {
|
if info == nil {
|
||||||
return fmt.Errorf(mandatoryFieldMissingTemplate, "info")
|
return fmt.Errorf(mandatoryFieldMissingTemplate, "info")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user