ISSUE-242 just some small refactoring

This commit is contained in:
Andrea Spacca
2019-06-23 21:06:58 +02:00
parent cc1a1b8487
commit 2cebb7520c
3 changed files with 4 additions and 4 deletions

View File

@ -132,8 +132,8 @@ type S3Storage struct {
noMultipart bool
}
func NewS3Storage(accessKey, secretKey, bucketName, endpoint string, logger *log.Logger, disableMultipart bool, region string) (*S3Storage, error) {
sess := getAwsSession(accessKey, secretKey, endpoint, region)
func NewS3Storage(accessKey, secretKey, bucketName, region, endpoint string, logger *log.Logger, disableMultipart bool) (*S3Storage, error) {
sess := getAwsSession(accessKey, secretKey, region, endpoint)
return &S3Storage{bucket: bucketName, s3: s3.New(sess), session: sess, logger: logger, noMultipart: disableMultipart}, nil
}

View File

@ -37,7 +37,7 @@ import (
"github.com/golang/gddo/httputil/header"
)
func getAwsSession(accessKey, secretKey, endpoint string, region string) *session.Session {
func getAwsSession(accessKey, secretKey, region, endpoint string) *session.Session {
return session.Must(session.NewSession(&aws.Config{
Region: aws.String(region),
Endpoint: aws.String(endpoint),