diff options
author | Christopher Wedgwood <cw@f00f.org> | 2010-04-11 10:29:07 -0700 |
---|---|---|
committer | Christopher Wedgwood <cw@f00f.org> | 2010-04-11 10:29:07 -0700 |
commit | 6eadb9f0567d33f1a92658600903308a1bb64f39 (patch) | |
tree | 111fe74601c189bab7a64eca0446a68a42329edf | |
parent | 040767e7eef3887faefaddece9f4cf91592c18e8 (diff) | |
download | golang-6eadb9f0567d33f1a92658600903308a1bb64f39.tar.gz |
archive/tar: update documentation to match current coding style
R=rsc, r
CC=golang-dev
http://codereview.appspot.com/903044
Committer: Rob Pike <r@golang.org>
-rw-r--r-- | src/pkg/archive/tar/reader.go | 6 | ||||
-rw-r--r-- | src/pkg/archive/tar/writer.go | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/pkg/archive/tar/reader.go b/src/pkg/archive/tar/reader.go index 9d598361a..7de559d33 100644 --- a/src/pkg/archive/tar/reader.go +++ b/src/pkg/archive/tar/reader.go @@ -24,9 +24,9 @@ var ( // and then it can be treated as an io.Reader to access the file's data. // // Example: -// tr := tar.NewReader(r); +// tr := tar.NewReader(r) // for { -// hdr, err := tr.Next(); +// hdr, err := tr.Next() // if err != nil { // // handle error // } @@ -34,7 +34,7 @@ var ( // // end of tar archive // break // } -// io.Copy(data, tr); +// io.Copy(data, tr) // } type Reader struct { r io.Reader diff --git a/src/pkg/archive/tar/writer.go b/src/pkg/archive/tar/writer.go index e02695256..7f200c440 100644 --- a/src/pkg/archive/tar/writer.go +++ b/src/pkg/archive/tar/writer.go @@ -25,15 +25,15 @@ var ( // writing at most hdr.Size bytes in total. // // Example: -// tw := tar.NewWriter(w); -// hdr := new(Header); -// hdr.Size = length of data in bytes; +// tw := tar.NewWriter(w) +// hdr := new(Header) +// hdr.Size = length of data in bytes // // populate other hdr fields as desired // if err := tw.WriteHeader(hdr); err != nil { // // handle error // } -// io.Copy(tw, data); -// tw.Close(); +// io.Copy(tw, data) +// tw.Close() type Writer struct { w io.Writer err os.Error |