first commit
This commit is contained in:
commit
cd78e06876
27
main.go
Normal file
27
main.go
Normal file
@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func main() {
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
|
||||
for {
|
||||
fmt.Print("> ")
|
||||
input, _ := reader.ReadString('\n')
|
||||
input = strings.Trim(input, "\n")
|
||||
switch {
|
||||
case input == "quit":
|
||||
fmt.Println("Goodbye.")
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
fmt.Println("You said: " + input)
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user