From 91f28f2ed615980f9c6b04bd9693805d082366a7 Mon Sep 17 00:00:00 2001 From: Ahrav Dutta Date: Tue, 15 Aug 2023 13:34:09 -0700 Subject: [PATCH] update const. --- pkg/handlers/archive.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/handlers/archive.go b/pkg/handlers/archive.go index 5fc2aee48ecc..2898e21d4d8a 100644 --- a/pkg/handlers/archive.go +++ b/pkg/handlers/archive.go @@ -119,7 +119,7 @@ func (a *Archive) openArchive(ctx context.Context, depth int, reader io.Reader, } // IsFiletype returns true if the provided reader is an archive. -func (s *Archive) IsFiletype(ctx context.Context, reader io.Reader) (io.Reader, bool) { +func (a *Archive) IsFiletype(ctx context.Context, reader io.Reader) (io.Reader, bool) { format, readerB, err := archiver.Identify("", reader) if err != nil { return readerB, false @@ -206,7 +206,7 @@ func (a *Archive) ReadToMax(ctx context.Context, reader io.Reader) (data []byte, } const ( - debMimeType = "application/x-unix-archive" + arMimeType = "application/x-unix-archive" rpmMimeType = "application/x-rpm" ) @@ -232,7 +232,7 @@ func (a *Archive) HandleSpecialized(ctx context.Context, reader io.Reader) (io.R } switch mimeType := kind.MIME.Value; mimeType { - case debMimeType: + case arMimeType: // includes .deb files reader, err = extractDebContent(ctx, reader) case rpmMimeType: reader, err = extractRpmContent(ctx, reader)