Remove use of deprecated tar.TypeRegA
Fixes golangci-lint message: `tar.TypeRegA has been deprecated since Go 1.11 and an alternative has been available since Go 1.1: Use TypeReg instead.` Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
parent
261a524b9e
commit
92582a75cc
|
@ -1721,7 +1721,7 @@ func copierHandlerPut(bulkReader io.Reader, req request, idMappings *idtools.IDM
|
|||
// no type flag for sockets
|
||||
default:
|
||||
return fmt.Errorf("unrecognized Typeflag %c", hdr.Typeflag)
|
||||
case tar.TypeReg, tar.TypeRegA:
|
||||
case tar.TypeReg:
|
||||
var written int64
|
||||
written, err = createFile(path, tr)
|
||||
// only check the length if there wasn't an error, which we'll
|
||||
|
|
|
@ -710,7 +710,7 @@ func testStat(t *testing.T) {
|
|||
result := st.Results[glob]
|
||||
|
||||
switch testItem.Typeflag {
|
||||
case tar.TypeReg, tar.TypeRegA:
|
||||
case tar.TypeReg:
|
||||
if actualContent, ok := testArchive.contents[testItem.Name]; ok {
|
||||
testItem.Size = int64(len(actualContent))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue