Forráskód Böngészése

Remove a now-useless function

jvoisin 1 éve
szülő
commit
2f56ebd3a6
1 módosított fájl, 4 hozzáadás és 8 törlés
  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
 	return false
 }
 }
 
 
-func getAttributeValue(name string, attributes []html.Attribute) string {
+func getIntegerAttributeValue(name string, attributes []html.Attribute) int {
 	for _, attribute := range attributes {
 	for _, attribute := range attributes {
 		if attribute.Key == name {
 		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
 }
 }