README ¶ spinner package main import ( "time" "github.com/pterm/pterm" ) func main() { // Create and start a fork of the default spinner. spinnerSuccess, _ := pterm.DefaultSpinner.Start("Doing something important... (will succeed)") time.Sleep(time.Second * 3) // Simulate 3 seconds of processing something. spinnerSuccess.Success() // Resolve spinner with success message. // Create and start a fork of the default spinner. spinnerWarning, _ := pterm.DefaultSpinner.Start("Doing something important... (will warn)") time.Sleep(time.Second * 3) // Simulate 3 seconds of processing something. spinnerWarning.Warning() // Resolve spinner with warning message. // Create and start a fork of the default spinner. spinnerFail, _ := pterm.DefaultSpinner.Start("Doing something important... (will fail)") time.Sleep(time.Second * 3) // Simulate 3 seconds of processing something. spinnerFail.Fail() // Resolve spinner with error message. // Create and start a fork of the default spinner. spinnerLiveText, _ := pterm.DefaultSpinner.Start("Doing a lot of stuff...") time.Sleep(time.Second * 2) // Simulate 2 seconds of processing something. spinnerLiveText.UpdateText("It's really much") // Update spinner text. time.Sleep(time.Second * 2) // Simulate 2 seconds of processing something. spinnerLiveText.UpdateText("We're nearly done!") // Update spinner text. time.Sleep(time.Second * 2) // Simulate 2 seconds of processing something. spinnerLiveText.Success("Finally!") // Resolve spinner with success message. } Expand ▾ Collapse ▴ Documentation ¶ There is no documentation for this package. Source Files ¶ View all Source files main.go Click to show internal directories. Click to hide internal directories.