Explorar el Código

Remove a now-useless function

jvoisin hace 1 año
padre
commit
2f56ebd3a6
Se han modificado 1 ficheros con 4 adiciones y 8 borrados
  1. 4 8
      internal/reader/sanitizer/sanitizer.go

+ 4 - 8
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
 }