Chore: linter complaints

This commit is contained in:
Grail Finder
2026-02-25 20:06:56 +03:00
parent 4f07994bdc
commit 888c9fec65
12 changed files with 11 additions and 123 deletions

View File

@@ -95,9 +95,7 @@ func extractTextFromEpub(fpath string) (string, error) {
return "", fmt.Errorf("failed to open epub: %w", err)
}
defer r.Close()
var sb strings.Builder
for _, f := range r.File {
ext := strings.ToLower(path.Ext(f.Name))
if ext != ".xhtml" && ext != ".html" && ext != ".htm" && ext != ".xml" {
@@ -129,7 +127,6 @@ func extractTextFromEpub(fpath string) (string, error) {
sb.WriteString(stripHTML(string(buf)))
}
}
if sb.Len() == 0 {
return "", errors.New("no content extracted from epub")
}