You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package main
import (
"github.com/pterm/pterm"
)
funcmain() {
// Create an interactive continue prompt with default settings// This will pause the program execution until the user presses enter// The message displayed is "Press 'Enter' to continue..."prompt:=pterm.DefaultInteractiveContinue// Show the prompt and wait for user input// The returned result is the user's input (should be empty as it's a continue prompt)// The second return value is an error which is ignored hereresult, _:=prompt.Show()
// Print a blank line for better readabilitypterm.Println()
// Print the user's input with an info prefix// As this is a continue prompt, the input should be emptypterm.Info.Printfln("You answered: %s", result)
}