From 4ce91a5cf83cfde90aaf1f3cd92041fce6ec5972 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 5e31a6360ec..436f4089f28 100644 --- a/internal/reader/sanitizer/sanitizer.go +++ b/internal/reader/sanitizer/sanitizer.go @@ -460,16 +460,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 }