20 lines
247 B
Go
20 lines
247 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"bufio"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func GetResponse(prompt string) string {
|
||
|
fmt.Print(prompt, " ")
|
||
|
|
||
|
scanner := bufio.NewScanner(os.Stdin)
|
||
|
var response string
|
||
|
if scanner.Scan() {
|
||
|
response = scanner.Text()
|
||
|
}
|
||
|
|
||
|
return response
|
||
|
}
|