diff --git a/s3/s3.go b/s3/s3.go index 69ab117004cc801ad06f509c358f989f43e2dc8b..819cddd8f1ab7b23d4c9e9165eec5a449c5c3e41 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 }