mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 01:30:25 +08:00
20 lines
324 B
Go
20 lines
324 B
Go
package cmdline
|
|
|
|
import (
|
|
"bufio"
|
|
"fmt"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func EnterToContinue() {
|
|
fmt.Print("Press 'Enter' to continue...")
|
|
bufio.NewReader(os.Stdin).ReadBytes('\n')
|
|
}
|
|
|
|
func ReadLine(prompt string) string {
|
|
fmt.Print(prompt)
|
|
input, _ := bufio.NewReader(os.Stdin).ReadString('\n')
|
|
return strings.TrimSpace(input)
|
|
}
|