Skip to content

Commit

Permalink
解决末行无法打印问题 (#783)
Browse files Browse the repository at this point in the history
* 解决末行无法打印问题

* Apply suggestions from code review

Co-authored-by: ᴜɴᴋɴᴡᴏɴ <u@gogs.io>
  • Loading branch information
1sunzichen and unknwon authored Dec 12, 2020
1 parent 8068809 commit 00a657e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eBook/12.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import (
func cat(r *bufio.Reader) {
for {
buf, err := r.ReadBytes('\n')
fmt.Fprintf(os.Stdout, "%s", buf)
if err == io.EOF {
break
}
fmt.Fprintf(os.Stdout, "%s", buf)
}
return
}
Expand Down

0 comments on commit 00a657e

Please sign in to comment.