diff options
| author | Grail Finder <wohilas@gmail.com> | 2026-02-25 20:06:56 +0300 |
|---|---|---|
| committer | Grail Finder <wohilas@gmail.com> | 2026-02-25 20:06:56 +0300 |
| commit | 888c9fec652b82174702c710f54f7d64f194315c (patch) | |
| tree | 883051d653dda2d57b227670bfd3721bf6cf426a /rag/extractors.go | |
| parent | 4f07994bdc3d23421cf3941af3edc18c05ffc94b (diff) | |
Chore: linter complaints
Diffstat (limited to 'rag/extractors.go')
| -rw-r--r-- | rag/extractors.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/rag/extractors.go b/rag/extractors.go index 4255fdb..0f9f3f4 100644 --- a/rag/extractors.go +++ b/rag/extractors.go @@ -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") } |
