net/http: improve the examples to show that StatusCode checking is necessary #39778
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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
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.
The text was updated successfully, but these errors were encountered: