mirror of
https://github.com/Luzifer/mondash.git
synced 2024-12-22 20:11:18 +00:00
Fix: Initialization of s3 object needed adjustment
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
fd7056f82f
commit
e4d3089e3e
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import (
|
||||||
"github.com/Luzifer/mondash/config"
|
"github.com/Luzifer/mondash/config"
|
||||||
"github.com/aws/aws-sdk-go/aws"
|
"github.com/aws/aws-sdk-go/aws"
|
||||||
"github.com/aws/aws-sdk-go/aws/awserr"
|
"github.com/aws/aws-sdk-go/aws/awserr"
|
||||||
|
"github.com/aws/aws-sdk-go/aws/session"
|
||||||
"github.com/aws/aws-sdk-go/service/s3"
|
"github.com/aws/aws-sdk-go/service/s3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -19,7 +20,7 @@ type S3Storage struct {
|
||||||
|
|
||||||
// NewS3Storage instanciates a new S3Storage
|
// NewS3Storage instanciates a new S3Storage
|
||||||
func NewS3Storage(cfg *config.Config) *S3Storage {
|
func NewS3Storage(cfg *config.Config) *S3Storage {
|
||||||
s3connection := s3.New(&aws.Config{})
|
s3connection := s3.New(session.Must(session.NewSession()))
|
||||||
return &S3Storage{
|
return &S3Storage{
|
||||||
s3connection: s3connection,
|
s3connection: s3connection,
|
||||||
cfg: cfg,
|
cfg: cfg,
|
||||||
|
|
Loading…
Reference in a new issue