From 9fc96a9adc1b4cdab224e16d312263158e1a5ae8 Mon Sep 17 00:00:00 2001 From: Johan de Klerk <johan@shiplogic.com> Date: Thu, 12 Jan 2023 09:31:45 +0200 Subject: [PATCH] Changed GetS3Session to GetSession --- s3/s3.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/s3/s3.go b/s3/s3.go index 69ab117..819cddd 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -79,14 +79,14 @@ const ( ) var ( - s3Sessions = map[string]*SessionWithHelpers{} + sessions = map[string]*SessionWithHelpers{} ) type SessionWithHelpers struct { S3Session *s3.S3 } -func GetS3Session(region ...string) *SessionWithHelpers { +func GetSession(region ...string) *SessionWithHelpers { s3Region := "af-south-1" @@ -96,7 +96,7 @@ func GetS3Session(region ...string) *SessionWithHelpers { } // Check if session exists for region, if it does return it - if s3Session, ok := s3Sessions[s3Region]; ok { + if s3Session, ok := sessions[s3Region]; ok { return s3Session } @@ -113,7 +113,7 @@ func GetS3Session(region ...string) *SessionWithHelpers { } s3Session := NewSession(sess) - s3Sessions[s3Region] = s3Session + sessions[s3Region] = s3Session return s3Session } -- GitLab