Browse Source

Update 12.5.md (#777)

修复示例打开文件未关闭错误
sbkebcmj 5 years ago
parent
commit
f8479c8188
1 changed files with 1 additions and 0 deletions
  1. 1 0
      eBook/12.5.md

+ 1 - 0
eBook/12.5.md

@@ -40,6 +40,7 @@ func main() {
 			continue
 		}
 		cat(bufio.NewReader(f))
+		f.Close()
 	}
 }
 ```