Skip to content

Commit 490baeb

Browse files
committed
Move constant to declaration blocks
Signed-off-by: Philippe Martin <[email protected]>
1 parent c45fcd6 commit 490baeb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

registry-library/library/library.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,16 @@ const (
4747
DevfilePNGLogoMediaType = "image/png"
4848
DevfileArchiveMediaType = "application/x-tar"
4949

50+
OwnersFile = "OWNERS"
51+
5052
httpRequestTimeout = 30 * time.Second // httpRequestTimeout configures timeout of all HTTP requests
5153
responseHeaderTimeout = 30 * time.Second // responseHeaderTimeout is the timeout to retrieve the server's response headers
5254
)
5355

5456
var (
5557
DevfileMediaTypeList = []string{DevfileMediaType}
5658
DevfileAllMediaTypesList = []string{DevfileMediaType, DevfilePNGLogoMediaType, DevfileSVGLogoMediaType, DevfileVSXMediaType, DevfileArchiveMediaType}
59+
ExcludedFiles = []string{OwnersFile}
5760
)
5861

5962
type Registry struct {
@@ -330,7 +333,7 @@ func PullStackByMediaTypesFromRegistry(registry string, stack string, allowedMed
330333
// Decompress archive.tar
331334
archivePath := filepath.Join(destDir, "archive.tar")
332335
if _, err := os.Stat(archivePath); err == nil {
333-
err := decompress(destDir, archivePath, []string{"OWNERS"})
336+
err := decompress(destDir, archivePath, ExcludedFiles)
334337
if err != nil {
335338
return err
336339
}

0 commit comments

Comments
 (0)