pwt ("port wait") is a commandline utility that blocks until a tcp socket, aka port becomes available. Designed to replace the bash sleep command in your CI/CD scripts, this process will exit with 0 once the socket connects, or -1 in the event of a timeout.
- -h -v flags for cli
- bumped to go 1.20
brew tap simonmittag/cli && brew install pwt && pwt git clone https://github.com/simonmittag/pwt && cd pwt && go install github.com/simonmittag/pwt/cmd/pwt && pwt λ pwt[v0.1.7] Usage: pwt [-v]|[-w n] host[:port] -h print usage instructions -v print pwt version -w int time wait in seconds (default 10) Wait for ipv4 localhost on default port
λ pwt 127.0.0.1 pwt waiting for 127.0.0.1:80 .......... aborted after 10 seconds Wait for ipv6 localhost on port 8080 for 3 seconds
λ pwt -w 3 [::1]:8080 pwt waiting for [::1]:8080 .. connected in 2 seconds Wait for google on port 443
λ pwt -w 60 google.com:443 pwt waiting for google.com:443 connected in <1 second The pwt team welcomes all contributors. Everyone interacting with the project's codebase, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct
