main.go
299 Bytes
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
var input string
sc := bufio.NewScanner(os.Stdin)
for {
fmt.Print("input: ")
sc.Scan()
input = sc.Text()
exit(input)
fmt.Printf("output: %s\n", input)
}
}
func exit(input string) {
if input == "exit" {
os.Exit(0)
}
}