Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
ae729a43
Commit
ae729a43
authored
Apr 11, 2010
by
Christopher Wedgwood
Committed by
Rob Pike
Apr 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/tar: update documentation to match current coding style
R=rsc, r CC=golang-dev
https://golang.org/cl/903044
parent
98a5a20c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
src/pkg/archive/tar/reader.go
src/pkg/archive/tar/reader.go
+3
-3
src/pkg/archive/tar/writer.go
src/pkg/archive/tar/writer.go
+5
-5
No files found.
src/pkg/archive/tar/reader.go
View file @
ae729a43
...
@@ -24,9 +24,9 @@ var (
...
@@ -24,9 +24,9 @@ var (
// and then it can be treated as an io.Reader to access the file's data.
// and then it can be treated as an io.Reader to access the file's data.
//
//
// Example:
// Example:
// tr := tar.NewReader(r)
;
// tr := tar.NewReader(r)
// for {
// for {
// hdr, err := tr.Next()
;
// hdr, err := tr.Next()
// if err != nil {
// if err != nil {
// // handle error
// // handle error
// }
// }
...
@@ -34,7 +34,7 @@ var (
...
@@ -34,7 +34,7 @@ var (
// // end of tar archive
// // end of tar archive
// break
// break
// }
// }
// io.Copy(data, tr)
;
// io.Copy(data, tr)
// }
// }
type
Reader
struct
{
type
Reader
struct
{
r
io
.
Reader
r
io
.
Reader
...
...
src/pkg/archive/tar/writer.go
View file @
ae729a43
...
@@ -25,15 +25,15 @@ var (
...
@@ -25,15 +25,15 @@ var (
// writing at most hdr.Size bytes in total.
// writing at most hdr.Size bytes in total.
//
//
// Example:
// Example:
// tw := tar.NewWriter(w)
;
// tw := tar.NewWriter(w)
// hdr := new(Header)
;
// hdr := new(Header)
// hdr.Size = length of data in bytes
;
// hdr.Size = length of data in bytes
// // populate other hdr fields as desired
// // populate other hdr fields as desired
// if err := tw.WriteHeader(hdr); err != nil {
// if err := tw.WriteHeader(hdr); err != nil {
// // handle error
// // handle error
// }
// }
// io.Copy(tw, data)
;
// io.Copy(tw, data)
// tw.Close()
;
// tw.Close()
type
Writer
struct
{
type
Writer
struct
{
w
io
.
Writer
w
io
.
Writer
err
os
.
Error
err
os
.
Error
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment