Skip to content

Commit

Permalink
update const.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav committed Aug 15, 2023
1 parent 24290db commit 91f28f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/handlers/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
)

Expand All @@ -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)
Expand Down

0 comments on commit 91f28f2

Please sign in to comment.