anaskhan96 / soup

Web Scraper in Go, similar to BeautifulSoup
MIT License
2.18k stars 168 forks source link

fix(soup):fix when r.pointer is nil cause panic #53

Closed greenpipig closed 4 years ago

greenpipig commented 4 years ago

Change-Id: I51f8f0d5b94bcdfdf8845b37edc63498f4d4cda6 when i use it ,i find if the r.poniter is nil,will panic,i thought add a judge will be fine

anaskhan96 commented 4 years ago

Sorry, but i don't believe this is the right design choice for a library. Choices like checking for a receiver's nil pointer dereferencing is specific to the developer's use cases, and a library should not be making such assumptions.