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:
Chris Evich 2023-05-04 12:09:49 -04:00
parent 261a524b9e
commit 92582a75cc
No known key found for this signature in database
GPG Key ID: 03EDC70FD578067F
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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))
}