Skip to content

Commit a4aa5c3

Browse files
Stanislav Afanasevdsnet
Stanislav Afanasev
authored andcommitted
archive/tar: a cosmetic fix after checking by golint
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 <[email protected]> Run-TryBot: Joe Tsai <[email protected]>
1 parent 13cfb15 commit a4aa5c3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/archive/tar/reader.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,8 @@ func (tr *Reader) readGNUSparsePAXHeaders(hdr *Header) (sparseDatas, error) {
238238
// Read the sparse map according to the appropriate format.
239239
if is1x0 {
240240
return readGNUSparseMap1x0(tr.curr)
241-
} else {
242-
return readGNUSparseMap0x1(hdr.PAXRecords)
243241
}
242+
return readGNUSparseMap0x1(hdr.PAXRecords)
244243
}
245244

246245
// mergePAX merges paxHdrs into hdr for all relevant fields of Header.
@@ -674,11 +673,12 @@ func (fr *regFileReader) WriteTo(w io.Writer) (int64, error) {
674673
return io.Copy(w, struct{ io.Reader }{fr})
675674
}
676675

677-
func (rf regFileReader) LogicalRemaining() int64 {
678-
return rf.nb
676+
func (fr regFileReader) LogicalRemaining() int64 {
677+
return fr.nb
679678
}
680-
func (rf regFileReader) PhysicalRemaining() int64 {
681-
return rf.nb
679+
680+
func (fr regFileReader) PhysicalRemaining() int64 {
681+
return fr.nb
682682
}
683683

684684
// sparseFileReader is a fileReader for reading data from a sparse file entry.

0 commit comments

Comments
 (0)