aboutsummaryrefslogtreecommitdiff
path: root/src/archive/tar/reader.go
diff options
context:
space:
mode:
authorJoe Tsai <joetsai@digital-static.net>2017-08-14 20:11:02 -0700
committerJoe Tsai <thebrokentoaster@gmail.com>2017-08-15 05:09:54 +0000
commita0237c527bbd093bfabe682cbab0562bc4c628e4 (patch)
tree70ee077310d386f082908de8abc9e23ccad3d793 /src/archive/tar/reader.go
parentde7e5d45df866015fa5cb7c9997b2d1119366b9a (diff)
downloadgo-a0237c527bbd093bfabe682cbab0562bc4c628e4.tar.xz
archive/tar: centralize errors in common.go
Move all sentinel errors to common.go since some of them are returned by both the reader and writer and remove errInvalidHeader since it not used. Also, consistently use the "tar: " prefix for errors. Change-Id: I0afb185bbf3db80dfd9595321603924454a4c2f9 Reviewed-on: https://go-review.googlesource.com/55650 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/archive/tar/reader.go')
-rw-r--r--src/archive/tar/reader.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go
index 98f6ea86fa..fb7cb8891d 100644
--- a/src/archive/tar/reader.go
+++ b/src/archive/tar/reader.go
@@ -9,7 +9,6 @@ package tar
import (
"bytes"
- "errors"
"io"
"io/ioutil"
"math"
@@ -18,10 +17,6 @@ import (
"time"
)
-var (
- ErrHeader = errors.New("archive/tar: invalid tar header")
-)
-
// A Reader provides sequential access to the contents of a tar archive.
// A tar archive consists of a sequence of files.
// The Next method advances to the next file in the archive (including the first),