But there's some parts in there I certainly wouldn't call elegant. For example, if you trace function calls from http.Get() you end up in a lovely function called doFollowingRedirects()[0] which is where the actual request is made inside of a for {} loop.
Be it efficiency, some stylistic tendency I'm unaware of, or some contrived excuse that doesn't make any sense, at the end of the day I'm not likely to look for a function called doFollowingRedirects when I want to see where the initial (and likely only) request is made.
[0]: https://github.com/golang/go/blob/master/src/net/http/client...
In that context, the function doesn't seem so surprising. If you take a look at the function `Do`[0], you'll notice it calls out to either 'send' or 'doFollowingRedirects' depending on whether it's a request that should 'do, following redirects' or simply 'send a single request'.
Many HTTP libraries I've seen are structured around creating a request object and then handing it to a 'do request' function - the crime here at best seems to be the naming 'doFollowingRedirects', which can be read as 'do the subsequent redirects' which might make it seem odd that the first request was included in the for loop therein.
https://talks.golang.org/2015/gofmt-en.slide ("The Cultural Evolution of gofmt) (2015)
"Evolution in programming culture:
-gofmt is significant selling point for Go
-Insight is spreading that uniform "good enough" formatting is hugely beneficial.
-Source code manipulation at AST-level enables a new category of tools.
-Others are taking note: Programming culture is slowly evolving. "
It will zoom out the slides and make them readable. Weird how that is necessary.