tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
3.76k stars 523 forks source link

scraper: fix concurrent scraped links map access #813

Closed vdpoora closed 2 months ago

vdpoora commented 2 months ago

PR Checklist

When running the scraper, there would occasionally be panics for concurrent map access of the scrapedLinks map.
Adding a sync.RWMutex around all accesses of the map fixes this issue.