Usage
echo "Hello World" | go run main.goOutput
Hello
Usage
echo "Hello World" | go run main.goOutput
Hello
| module experimental-software.com/sandbox | |
| go 1.17 |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| // var reader = bufio.NewReader(os.Stdin) | |
| // message, _ := reader.ReadString(' ') | |
| // fmt.Println(message) | |
| var input string | |
| fmt.Scan(&input) | |
| fmt.Println(input) | |
| } |