Skip to content

Commit 2f56ebd

Browse files
jvoisinfguillot
authored andcommitted
Remove a now-useless function
1 parent 059f5c0 commit 2f56ebd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

internal/reader/sanitizer/sanitizer.go

+4-8
Original file line numberDiff line numberDiff line change
@@ -452,16 +452,12 @@ func isPositiveInteger(value string) bool {
452452
return false
453453
}
454454

455-
func getAttributeValue(name string, attributes []html.Attribute) string {
455+
func getIntegerAttributeValue(name string, attributes []html.Attribute) int {
456456
for _, attribute := range attributes {
457457
if attribute.Key == name {
458-
return attribute.Val
458+
number, _ := strconv.Atoi(attribute.Val)
459+
return number
459460
}
460461
}
461-
return ""
462-
}
463-
464-
func getIntegerAttributeValue(name string, attributes []html.Attribute) int {
465-
number, _ := strconv.Atoi(getAttributeValue(name, attributes))
466-
return number
462+
return 0
467463
}

0 commit comments

Comments
 (0)