1
0
mirror of https://github.com/golang/go synced 2024-11-24 21:10:04 -07:00

archive/tar: fix example's handling of os.EOF.

Fixes #1677.

R=r
CC=golang-dev
https://golang.org/cl/4402042
This commit is contained in:
David Symonds 2011-04-13 10:56:33 +10:00
parent 328aac3a49
commit 1de71a07e0

View File

@ -27,13 +27,13 @@ var (
// tr := tar.NewReader(r)
// for {
// hdr, err := tr.Next()
// if err != nil {
// // handle error
// }
// if hdr == nil {
// if err == os.EOF {
// // end of tar archive
// break
// }
// if err != nil {
// // handle error
// }
// io.Copy(data, tr)
// }
type Reader struct {