Commit 1de71a07 authored by David Symonds's avatar David Symonds

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

Fixes #1677.

R=r
CC=golang-dev
https://golang.org/cl/4402042
parent 328aac3a
......@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment