Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate NewDocument and NewDocumentFromResponse #173

Closed
mna opened this issue Apr 4, 2017 · 1 comment
Closed

Deprecate NewDocument and NewDocumentFromResponse #173

mna opened this issue Apr 4, 2017 · 1 comment

Comments

@mna
Copy link
Member

mna commented Apr 4, 2017

The documentation should mention that NewDocument(url) and NewDocumentFromResponse(httpResponse) are just helpers for quick prototyping/testing, but for "production" code, the HTTP handling should be done outside goquery, and call NewDocumentFromReader(io.Reader) when needed.

Many recent issues are raised because people expect a wide array of behaviour from those 2 functions which shouldn't have been added in the first place. Maybe they should be properly deprecated (as explained here: https://rakyll.org/deprecated/).

At the very least the docs should mention that "advanced" usage of those functions is not recommended. WIth better wording of course.

@ghost
Copy link

ghost commented Apr 5, 2017

I am sorry I don'n use goQuery. I just newb TT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant