Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: improve the examples to show that StatusCode checking is necessary #39778
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.