Hacker News new | ask | show | jobs
by masklinn 1470 days ago
Python’s request is exactly the same (the client is called Session). I guess the go client just uses a global connection pool by default?
1 comments

Yes - `DefaultClient` in `net/http` is what the various package level methods operate on. This is constitutionally bad as global state that dependencies can mutate at will during init (or any other time), hence go-cleanhttp [1].

[1]: https://github.com/hashicorp/go-cleanhttp