anaskhan96/soup

Remove global variable in find.go

anaskhan96 opened this issue · 0 comments

nodeLinks is a global variable in the file find.go which is being initialised to a new slice of capacity 10 whenever FindAll() in soup.go is being called. This creates problems when the FindAll() function is called concurrently in the driver program, as nodeLinks keeps on getting initialised without fetching the nodes for either of the functions.