How to build a Go Reverse shell (Linux/Windows)

I wanted to share how to make a basic reverse shell for CTF challenges or just playing/learning with. So let’s get on with it.

What's a reverse shell?

A reverse shell is a shell session established from one machine to another, that is initiated from the remote machine, not from the attacker’s host.