]> Cypherpunks repositories - gostls13.git/commitdiff
archive/tar: a cosmetic fix after checking by golint
authorStanislav Afanasev <php.progger@gmail.com>
Tue, 7 Nov 2017 19:43:44 +0000 (22:43 +0300)
committerJoe Tsai <thebrokentoaster@gmail.com>
Tue, 7 Nov 2017 20:11:28 +0000 (20:11 +0000)
Existing methods regFileReader.LogicalRemaining and regFileReader.PhysicalRemaining have inconsistent reciever names with the previous name

Change-Id: Ief2024716737eaf482c4311f3fdf77d92801c36e
Reviewed-on: https://go-review.googlesource.com/76430
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>

src/archive/tar/reader.go

index 6bb2c46e7b818191f0cb5980286c10670586033a..1d0673020f259b9ab24d0709c77641482c1a6677 100644 (file)
@@ -238,9 +238,8 @@ func (tr *Reader) readGNUSparsePAXHeaders(hdr *Header) (sparseDatas, error) {
        // Read the sparse map according to the appropriate format.
        if is1x0 {
                return readGNUSparseMap1x0(tr.curr)
-       } else {
-               return readGNUSparseMap0x1(hdr.PAXRecords)
        }
+       return readGNUSparseMap0x1(hdr.PAXRecords)
 }
 
 // mergePAX merges paxHdrs into hdr for all relevant fields of Header.
@@ -674,11 +673,12 @@ func (fr *regFileReader) WriteTo(w io.Writer) (int64, error) {
        return io.Copy(w, struct{ io.Reader }{fr})
 }
 
-func (rf regFileReader) LogicalRemaining() int64 {
-       return rf.nb
+func (fr regFileReader) LogicalRemaining() int64 {
+       return fr.nb
 }
-func (rf regFileReader) PhysicalRemaining() int64 {
-       return rf.nb
+
+func (fr regFileReader) PhysicalRemaining() int64 {
+       return fr.nb
 }
 
 // sparseFileReader is a fileReader for reading data from a sparse file entry.