Navigation Menu

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

net/http: improve the examples to show that StatusCode checking is necessary #39778

Closed
odeke-em opened this issue Jun 23, 2020 · 3 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@odeke-em
Copy link
Member

Coming here from an offline debugging session with @indragiek, in which stacked in a bunch of services was a call to an HTTP service that matched the exact pattern from our net/http example on Get https://golang.org/pkg/net/http/#example_Get
Screen Shot 2020-06-23 at 1 42 29 AM

in that code we aren't checking for status codes, which I've seen in live code and just caused a bit of time wastage for a company. Given that the examples that we post will be copied as authoritative , we need to fix this up.

@odeke-em
Copy link
Member Author

@indragiek might be interested in fixing this.

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 23, 2020
@cagedmantis cagedmantis added this to the Backlog milestone Jun 23, 2020
@cagedmantis
Copy link
Contributor

/cc @bcmills @bradfitz

@gopherbot
Copy link

Change https://golang.org/cl/299609 mentions this issue: net/http: make ExampleGet show StatusCode checks for non-1XX,2XX responses

@golang golang locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants