Correct error messages for filters/matchers

This commit is contained in:
Joona Hoikkala 2018-11-12 19:07:31 +02:00
parent fbafd82c62
commit 1a8bcdfdfc
No known key found for this signature in database
GPG Key ID: D5AA86BBF9B29A5C
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ func NewSizeFilter(value string) (ffuf.FilterProvider, error) {
for _, sv := range strings.Split(value, ",") { for _, sv := range strings.Split(value, ",") {
intval, err := strconv.ParseInt(sv, 10, 0) intval, err := strconv.ParseInt(sv, 10, 0)
if err != nil { if err != nil {
return &SizeFilter{}, fmt.Errorf("Size filter (-fs): invalid value: %s", value) return &SizeFilter{}, fmt.Errorf("Size filter or matcher (-fs / -ms): invalid value: %s", value)
} }
intvals = append(intvals, intval) intvals = append(intvals, intval)
} }

View File

@ -17,7 +17,7 @@ func NewStatusFilter(value string) (ffuf.FilterProvider, error) {
for _, sv := range strings.Split(value, ",") { for _, sv := range strings.Split(value, ",") {
intval, err := strconv.ParseInt(sv, 10, 0) intval, err := strconv.ParseInt(sv, 10, 0)
if err != nil { if err != nil {
return &StatusFilter{}, fmt.Errorf("Status filter (-fc): invalid value %s", value) return &StatusFilter{}, fmt.Errorf("Status filter or matcher (-fc / -mc): invalid value %s", value)
} }
intvals = append(intvals, intval) intvals = append(intvals, intval)
} }