diff options
author | Agniva De Sarker <agnivade@yahoo.co.in> | 2018-02-24 10:52:04 +0530 |
---|---|---|
committer | Giovanni Bajo <rasky@develer.com> | 2018-02-25 21:50:17 +0000 |
commit | 39852bf4cce6927e01d0136c7843f65a801738cb (patch) | |
tree | 3a85144bf3d6e84884d30d25c5606c5f7d74ae28 /src/archive | |
parent | 7a218942be57765f842786abff85d3a813592d70 (diff) | |
download | go-39852bf4cce6927e01d0136c7843f65a801738cb.tar.gz go-39852bf4cce6927e01d0136c7843f65a801738cb.zip |
archive/tar: remove loop label from reader
CL 14624 introduced this label. At that time,
the switch-case had a break to label statement which made this necessary.
But now, the code no longer has a break statement and it directly returns.
Hence, it is no longer necessary to have a label.
Change-Id: Idde0fcc4d2db2d76424679f5acfe33ab8573bce4
Reviewed-on: https://go-review.googlesource.com/96935
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Diffstat (limited to 'src/archive')
-rw-r--r-- | src/archive/tar/reader.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/archive/tar/reader.go b/src/archive/tar/reader.go index ccfedb5851..3943718517 100644 --- a/src/archive/tar/reader.go +++ b/src/archive/tar/reader.go @@ -64,7 +64,6 @@ func (tr *Reader) next() (*Header, error) { // normally be visible to the outside. As such, this loop iterates through // one or more "header files" until it finds a "normal file". format := FormatUSTAR | FormatPAX | FormatGNU -loop: for { // Discard the remainder of the file and any padding. if err := discard(tr.r, tr.curr.PhysicalRemaining()); err != nil { @@ -102,7 +101,7 @@ loop: Format: format, }, nil } - continue loop // This is a meta header affecting the next header + continue // This is a meta header affecting the next header case TypeGNULongName, TypeGNULongLink: format.mayOnlyBe(FormatGNU) realname, err := ioutil.ReadAll(tr) @@ -117,7 +116,7 @@ loop: case TypeGNULongLink: gnuLongLink = p.parseString(realname) } - continue loop // This is a meta header affecting the next header + continue // This is a meta header affecting the next header default: // The old GNU sparse format is handled here since it is technically // just a regular file with additional attributes. |