I started building my cli-tool from scratch and feel a little bit lost.
I finally decided to challenge myself and not to use any AI-generation tools. But it’s a bit of a struggle as I really got attached to them.
So far, I ve decided that this tool would take an ip as arg and create a bunch of concurrent requests to the server (this is the place where i hope to learn about concurrency so it’s really stuck in my head). In the output it would provide nice formatted information about handled and failed requests, and latency etc.
It’s pretty simple i suppose. I hope to get to some level of complexity when I am finished with http and try to implement flags for web-sockets, e. g.
The idea also seemed interesing to me as i would need to deal with some security issues – if i get it right, i should implement some basic validation logic (ssh-keys or something) so the tool isn’t used in black hat type of situation.
If you have any sources or advice, please do. My goal is to do it without ai or any external libraries, in favor of real learning.
Perhaps this chapter of The Go Programming Language can be of use:
Go to page 17. “1.6. Fetching URLs Concurrently”. And take a look at the accompanying code: