line-filter
This commit is contained in:
parent
cdcf8eaaa5
commit
a870b9995d
@ -35,7 +35,7 @@ func main() {
|
|||||||
|
|
||||||
// The `EOF` error is expected when we reach the
|
// The `EOF` error is expected when we reach the
|
||||||
// end of input, so exit gracefully in that case.
|
// end of input, so exit gracefully in that case.
|
||||||
// Otherwise there is a problem.
|
// Otherwise there's a problem.
|
||||||
if err == io.EOF {
|
if err == io.EOF {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
# Make a file with a few lowercase lines.
|
# To try out our line filter, first make a file with a few
|
||||||
|
# lowercase lines.
|
||||||
$ echo 'hello' > /tmp/lines
|
$ echo 'hello' > /tmp/lines
|
||||||
$ echo 'filter' >> /tmp/lines
|
$ echo 'filter' >> /tmp/lines
|
||||||
|
|
||||||
# Use the line filter to get uppercase lines.
|
# Then use the line filter to get uppercase lines.
|
||||||
$ cat /tmp/lines | go run line-filters.go
|
$ cat /tmp/lines | go run line-filters.go
|
||||||
HELLO
|
HELLO
|
||||||
FILTER
|
FILTER
|
||||||
|
Loading…
x
Reference in New Issue
Block a user