Go - How to keep files in memory - transferring files between servers without storing them locally
Clash Royale CLAN TAG #URR8PPP Go - How to keep files in memory - transferring files between servers without storing them locally I am in the process of writing a simple deployment tool which needs to take tar files from s3, extract them and then upload them to our staging server. I would like to do this without storing the files locally, keeping them in memory. Here is my code to download files from s3 func s3downloadFile(downloader *s3manager.Downloader, item string) { localitem := strings.Replace(item, s3base, "", -1) os.MkdirAll(path.Dir(localitem), os.ModePerm) file, err := os.Create(localitem) if err != nil { exitErrorf("Unable to open file %q, %v", err) } defer file.Close() numBytes, err := downloader.Download(file, &s3.GetObjectInput{ Bucket: aws.String(s3bucket), Key: aws.String(item), }) if err != nil { exitErrorf("Unable to download item %q, %v", item,...