Skip to content

Commit

Permalink
Remove a now-useless function
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Dec 7, 2024
1 parent 4944e65 commit 4ce91a5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions internal/reader/sanitizer/sanitizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 4ce91a5

Please sign in to comment.