From 8e3c6a2ec586495c5b84bcb71a74073b9fbce1ed Mon Sep 17 00:00:00 2001 From: mrjoelkamp Date: Tue, 18 Jun 2024 09:39:12 -0500 Subject: [PATCH] feat: use os.ModePerm --- pkg/mirror/mirror.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mirror/mirror.go b/pkg/mirror/mirror.go index cd60f8d..6f00602 100644 --- a/pkg/mirror/mirror.go +++ b/pkg/mirror/mirror.go @@ -58,7 +58,7 @@ func PushIndexToRegistry(image v1.ImageIndex, imageName string) error { func SaveImageAsOCILayout(image v1.Image, path string) error { // Save the image to the local filesystem - err := os.MkdirAll(path, os.FileMode(0777)) + err := os.MkdirAll(path, os.ModePerm) if err != nil { return fmt.Errorf("failed to create directory: %w", err) } @@ -72,7 +72,7 @@ func SaveImageAsOCILayout(image v1.Image, path string) error { func SaveIndexAsOCILayout(image v1.ImageIndex, path string) error { // Save the index to the local filesystem - err := os.MkdirAll(path, os.FileMode(0777)) + err := os.MkdirAll(path, os.ModePerm) if err != nil { return fmt.Errorf("failed to create directory: %w", err) }