RES-84 # Improve Nuclei CLI interface (WIP)

* Pleasing the linter
dev
forgedhallpass 2021-08-03 15:39:15 +03:00
parent d3154648d2
commit 138745a6b1
2 changed files with 3 additions and 2 deletions

View File

@ -2,10 +2,10 @@ package model
import (
"fmt"
"github.com/projectdiscovery/nuclei/v2/pkg/utils"
"strings"
"github.com/projectdiscovery/nuclei/v2/internal/severity"
"github.com/projectdiscovery/nuclei/v2/pkg/utils"
)
type Info struct {
@ -47,6 +47,7 @@ func (stringSlice *StringSlice) UnmarshalYAML(unmarshal func(interface{}) error)
}
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 {
result = append(result, strings.ToLower(strings.TrimSpace(value))) // TODO do we need to introduce RawStringSlice and/or NormalizedStringSlices?
}

View File

@ -62,7 +62,7 @@ func isInfoMetadataMatch(tagFilter *filter.TagFilter, templateInfo *model.Info,
}
func validateMandatoryInfoFields(info *model.Info) error {
if &info == nil {
if info == nil {
return fmt.Errorf(mandatoryFieldMissingTemplate, "info")
}