From 2f56ebd3a6b7da575077fb568a950955577a04a2 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 7 Dec 2024 23:07:28 +0100 Subject: [PATCH] Remove a now-useless function --- internal/reader/sanitizer/sanitizer.go | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/internal/reader/sanitizer/sanitizer.go b/internal/reader/sanitizer/sanitizer.go index 196ce823..4608c335 100644 --- a/internal/reader/sanitizer/sanitizer.go +++ b/internal/reader/sanitizer/sanitizer.go @@ -452,16 +452,12 @@ func isPositiveInteger(value string) bool { return false } -func getAttributeValue(name string, attributes []html.Attribute) string { +func getIntegerAttributeValue(name string, attributes []html.Attribute) int { for _, attribute := range attributes { if attribute.Key == name { - return attribute.Val + number, _ := strconv.Atoi(attribute.Val) + return number } } - return "" -} - -func getIntegerAttributeValue(name string, attributes []html.Attribute) int { - number, _ := strconv.Atoi(getAttributeValue(name, attributes)) - return number + return 0 }