Created
April 24, 2013 02:05
-
-
Save atomaths/5449051 to your computer and use it in GitHub Desktop.
Simple echo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// $ echo Hello | go run echo.go | |
package main | |
import ( | |
"fmt" | |
"io" | |
"os" | |
) | |
func main() { | |
io.Copy(os.Stdout, os.Stdin) | |
fmt.Println("Got EOF -- bye") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment