]> Cypherpunks repositories - gostls13.git/commitdiff
archive/tar: fix inconsistent namespace usage in example
authorJeremy Jackins <jeremyjackins@gmail.com>
Mon, 1 Oct 2012 22:10:42 +0000 (08:10 +1000)
committerDavid Symonds <dsymonds@golang.org>
Mon, 1 Oct 2012 22:10:42 +0000 (08:10 +1000)
This fixes some example code in the tar package documentation, which
first refers to tar.NewWriter and then to Header, which is inconsistent
because NewWriter and Header are both in the tar namespace.

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/6595050

src/pkg/archive/tar/writer.go

index b2b7a58a10a7e22250af5074308d7dd3d98b1b36..a9c8fdbbc9ae26f2ac5ba6adf5af822ff287b544 100644 (file)
@@ -27,7 +27,7 @@ var (
 //
 // Example:
 //     tw := tar.NewWriter(w)
-//     hdr := new(Header)
+//     hdr := new(tar.Header)
 //     hdr.Size = length of data in bytes
 //     // populate other hdr fields as desired
 //     if err := tw.WriteHeader(hdr); err != nil {