Skip to content
Snippets Groups Projects
Commit 9fc96a9a authored by Johan de Klerk's avatar Johan de Klerk
Browse files

Changed GetS3Session to GetSession

parent a1a18e92
Branches
Tags
No related merge requests found
...@@ -79,14 +79,14 @@ const ( ...@@ -79,14 +79,14 @@ const (
) )
var ( var (
s3Sessions = map[string]*SessionWithHelpers{} sessions = map[string]*SessionWithHelpers{}
) )
type SessionWithHelpers struct { type SessionWithHelpers struct {
S3Session *s3.S3 S3Session *s3.S3
} }
func GetS3Session(region ...string) *SessionWithHelpers { func GetSession(region ...string) *SessionWithHelpers {
s3Region := "af-south-1" s3Region := "af-south-1"
...@@ -96,7 +96,7 @@ func GetS3Session(region ...string) *SessionWithHelpers { ...@@ -96,7 +96,7 @@ func GetS3Session(region ...string) *SessionWithHelpers {
} }
// Check if session exists for region, if it does return it // 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 return s3Session
} }
...@@ -113,7 +113,7 @@ func GetS3Session(region ...string) *SessionWithHelpers { ...@@ -113,7 +113,7 @@ func GetS3Session(region ...string) *SessionWithHelpers {
} }
s3Session := NewSession(sess) s3Session := NewSession(sess)
s3Sessions[s3Region] = s3Session sessions[s3Region] = s3Session
return s3Session return s3Session
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment