pwt

package module
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

README

pwt ("port wait") waits for you until a tcp socket, aka port becomes available and exits cleanly once it does. Designed for continuous integration scripts, never call sleep inside your pipeline again.

Circleci Builds Github Workflows Github Issues Github Activity
CodeClimate Maintainability CodeClimate Test Coverage Go Version License Version

What's New

v0.1.7

  • -h -v flags for cli
  • bumped to go 1.20

Up and running

Homebrew

brew tap simonmittag/cli &&
  brew install pwt &&
  pwt 

Golang

git clone https://github.com/simonmittag/pwt && cd pwt && 
go install github.com/simonmittag/pwt/cmd/pwt && 
pwt 

Usage

λ pwt[v0.1.6]
Usage: pwt [-v]|[-w n] host[:port]
  -h    print usage instructions
  -v    print pwt version
  -w int
        time wait in seconds (default 10)

Examples

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  

Contributions

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

Documentation

Index

Constants

View Source
const Version string = "v0.1.7"

Variables

This section is empty.

Functions

func Zzz

func Zzz(host string, port uint16, timeSeconds int) bool

Types

This section is empty.

Directories

Path Synopsis
cmd
pwt command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL