Chore: fix linter complaints

This commit is contained in:
Grail Finder
2025-10-21 10:44:07 +03:00
parent 6a8e854ef6
commit 428c45da16
6 changed files with 35 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
package rag
import (
"errors"
"fmt"
"gf-lt/config"
"gf-lt/models"
@@ -108,7 +109,7 @@ func (r *RAG) LoadRAG(fpath string) error {
}
if len(paragraphs) == 0 {
return fmt.Errorf("no valid paragraphs found in file")
return errors.New("no valid paragraphs found in file")
}
var (
@@ -222,7 +223,7 @@ func (r *RAG) fetchEmb(lines []string, errCh chan error, vectorCh chan<- []model
}
if len(embeddings) == 0 {
err := fmt.Errorf("no embeddings returned")
err := errors.New("no embeddings returned")
r.logger.Error("empty embeddings")
errCh <- err
return err