]> Cypherpunks repositories - gostls13.git/commitdiff
archive/tar: update documentation to match current coding style
authorChristopher Wedgwood <cw@f00f.org>
Sun, 11 Apr 2010 17:29:07 +0000 (10:29 -0700)
committerRob Pike <r@golang.org>
Sun, 11 Apr 2010 17:29:07 +0000 (10:29 -0700)
R=rsc, r
CC=golang-dev
https://golang.org/cl/903044

src/pkg/archive/tar/reader.go
src/pkg/archive/tar/writer.go

index 9d598361a4a79ab55da9b73d3edb4be8df1c3fa0..7de559d337f7f287499bb8e29522c165a64e83c3 100644 (file)
@@ -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
index e02695256e6ede210b79535e27cadbf5a12cccba..7f200c440b3843e919c5cc7ac927bbcf7b787024 100644 (file)
@@ -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