gocolly / colly

Elegant Scraper and Crawler Framework for Golang
https://go-colly.org/
Apache License 2.0
23.4k stars 1.77k forks source link

Context Get method should return interface type #51

Closed markelog closed 7 years ago

markelog commented 7 years ago

Currently, you can put anything in the context. Which was allowed after the fix for this issue. But it will type assert any value to a string nevertheless.

I propose to allow to retrieve an interface instead. Which would be a breaking change

asciimoo commented 7 years ago

@markelog context.GetAny() exists for this purpose: https://godoc.org/github.com/gocolly/colly#Context.GetAny

markelog commented 7 years ago

I see, thanks, missed that one