From 00a657e1923d3afd3b09d0a2f725ee3c11e01d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?romantic=E8=89=BE=E5=85=8B?= <3023493319@qq.com> Date: Sat, 12 Dec 2020 10:36:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E6=9C=AB=E8=A1=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=89=93=E5=8D=B0=E9=97=AE=E9=A2=98=20(#783)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 解决末行无法打印问题 * Apply suggestions from code review Co-authored-by: ᴜɴᴋɴᴡᴏɴ --- eBook/12.5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eBook/12.5.md b/eBook/12.5.md index 88b0a07..0b729ad 100644 --- a/eBook/12.5.md +++ b/eBook/12.5.md @@ -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 }