open-nomad/vendor/github.com/tj/go-spin
Isabel Suchanek dfaef2468c cli: add monitor flag to deployment status
Adding '-verbose' will print out the allocation information for the
deployment. This also changes the job run command so that it now blocks
until deployment is complete and adds timestamps to the output so that
it's more in line with the output of node drain.

This uses glint to print in place in running in a tty. Because glint
doesn't yet support cmd/powershell, Windows workflows use a different
library to print in place, which results in slightly different
formatting: 1) different margins, and 2) no spinner indicating
deployment in progress.
2021-06-09 16:18:45 -07:00
..
go-spin.gif cli: add monitor flag to deployment status 2021-06-09 16:18:45 -07:00
Readme.md cli: add monitor flag to deployment status 2021-06-09 16:18:45 -07:00
spin.go cli: add monitor flag to deployment status 2021-06-09 16:18:45 -07:00

go-spin

Little terminal spinner lib.

View the docs.

Installation

$ go get github.com/tj/go-spin

Example

s := spin.New()
for i := 0; i < 30; i++ {
  fmt.Printf("\r  \033[36mcomputing\033[m %s ", s.Next())
  time.Sleep(100 * time.Millisecond)
}

GIF FTW

License

MIT