From fcb8d416c42a016b94f1005ff7d664d70511c0aa Mon Sep 17 00:00:00 2001 From: gilfoyle97 Date: Fri, 11 Feb 2022 20:00:52 +0100 Subject: [PATCH] Update errors.go --- scanner/errors.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scanner/errors.go b/scanner/errors.go index 40a468c..2f1b3fd 100644 --- a/scanner/errors.go +++ b/scanner/errors.go @@ -19,19 +19,24 @@ along with this program. If not, see http://www.gnu.org/licenses/. package scanner //Error struct +// ErrorName = the name that identifies the error +// Regex = The regular expression to be matched type Error struct { ErrorName string Regex []string } //ErrorMatched struct +// Error = Error struct +// Url = url in which the error is found +// Match = the string matching the regex type ErrorMatched struct { Error Error Url string Match string } -//GetErrorRegexes returns all the error regexes +//GetErrorRegexes returns all the error structs func GetErrorRegexes() []Error { var regexes = []Error{ { @@ -60,7 +65,7 @@ func GetErrorRegexes() []Error { return regexes } -//RemoveDuplicateErrors removes duplicates from secrets found +//RemoveDuplicateErrors removes duplicates from Errors found func RemoveDuplicateErrors(input []ErrorMatched) []ErrorMatched { keys := make(map[string]bool) list := []ErrorMatched{}