From adb3c6626e518aa8f09fef64e92d19ca17129608 Mon Sep 17 00:00:00 2001 From: Steven Masley Date: Fri, 13 Dec 2024 09:43:54 -0600 Subject: [PATCH] add a comment to prevent copy into memory --- storage/artifactory.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/artifactory.go b/storage/artifactory.go index ec1eea2..1a92038 100644 --- a/storage/artifactory.go +++ b/storage/artifactory.go @@ -299,6 +299,8 @@ func (s *Artifactory) Open(ctx context.Context, fp string) (fs.File, error) { } } + // TODO: Do no copy the bytes into memory, stream them rather than + // storing the entire file into memory. f := mem.NewFileHandle(mem.CreateFile(fp)) _, err = io.Copy(f, resp) if err != nil {