> httpstat.py is a wrapper around curl(1), which is all fine and good, but what if you don't have curl(1) or python(1) installed?
So, the point of this is if you don't have either curl or python, but you do have golang. I can't imagine when that would happen. Is it intended for use inside a container?
the curl you get on powershell is absolutely not the same. The output of curl -v is totally different.
And no, even if you develop web apps you don't necessarily have Python installed. If I wrote node, or C#, or Go, or PHP exclusively, why would I bother with Python ? Sure there are some useful tools in Python, but it's absolutely not a given that you'll have it. Unlike on Linux, where Python is installed by default everywhere and you can basically assume Python is available.
In theory, somebody could publish a binary that could be downloaded and run standalone -- no need for "go get". Looks like no such binary has been published, though.
Looks pretty shoddy from an IPv4/IPv6 point of view. It uses fmt.Sprintf("%s:%s") instead of net.JoinHostPort, and net.ResolveTCPAddr returns a single IP address instead of a properly-ordered list.
So it will probably fail to connect to an IPv6 literal, or to a dualstack hostname from an IPv6-only client.
Please don't use colored output if you didn't first check the background color of the terminal. If you can't check the background color of the terminal, then don't use colored output.
This isn't about load testing though. This is about getting some more useful information out of doing a request from a CLI, which can be a very handy way to see if there's an indication of a problem with an endpoint or a specific host.
It can be done with curl but then you also have to write a template for the output and pass it in to curl with -w to get things like timings.
So, the point of this is if you don't have either curl or python, but you do have golang. I can't imagine when that would happen. Is it intended for use inside a container?