package prompt import ( "bufio" "fmt" "os" "strings" ) func StringPrompt(label string) string { var str string r := bufio.NewReader(os.Stdin) for { fmt.Fprint(os.Stderr, label+" ") str, _ = r.ReadString('\n') if str != "" { break } } return strings.TrimSpace(str) }