# Ask the kernel to give us an open port.export port=$(freeport)# Start standalone httpd server for testinghttpd-X-c"Listen $port"&# Curl local server on the selected portcurllocalhost:$port
sudo apt-get install golang # Download go. Alternativly build from source: https://golang.org/doc/install/source
mkdir~/.gopath&&export GOPATH=~/.gopath# Replace with desired GOPATHexport PATH=$PATH:$GOPATH/bin# For convenience, add go's bin dir to your PATHgogetgithub.com/phayes/freeport/cmd/freeport