In this lesson, we will implement several common unix commands in Go.
- The commands
- cat - copy input to standard output | 15 minutes
- head - ouput the first part of files | 15 minutes
- tail - ouput the last part of files | 15 minutes
- tac - copy input to standard output in reverse | 15 minutes
-
go get lesson3/go-cat-01
-
go test lesson3/go-cat-01
-
reading from standard input
-
reading from a file
-
writing to standard output
-
io package
- io.Reader
- io.Writer
-
The os package
- io.Reader
- io.Writer