Skip to content

Commit

Permalink
Add missing file close to both examples
Browse files Browse the repository at this point in the history
  • Loading branch information
philippgille committed Mar 10, 2024
1 parent 0223445 commit c16b7d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/rag-wikipedia-ollama/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func main() {
if err != nil {
panic(err)
}
defer f.Close()
d := json.NewDecoder(f)
log.Println("Reading JSON lines...")
for i := 1; ; i++ {
Expand Down
1 change: 1 addition & 0 deletions examples/semantic-search-arxiv-openai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func main() {
if err != nil {
panic(err)
}
defer f.Close()
d := json.NewDecoder(f)
log.Println("Reading JSON lines...")
i := 0
Expand Down

0 comments on commit c16b7d9

Please sign in to comment.