File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -12,25 +12,25 @@ var DynamoDB *dynamodb.DynamoDB
12
12
13
13
// GetDynamoSession returns a new dynamodb session
14
14
func GetDynamoSession (accessKeyID , secretAccessKey , region string ) * dynamodb.DynamoDB {
15
- session_config := session.Options {}
15
+ sessionConfig := session.Options {}
16
16
if accessKeyID != "" || secretAccessKey != "" {
17
17
token := ""
18
18
creds := credentials .NewStaticCredentials (accessKeyID , secretAccessKey , token )
19
19
_ , err := creds .Get ()
20
20
if err != nil {
21
21
panic (err )
22
22
}
23
- session_config .Config .Credentials = creds
23
+ sessionConfig .Config .Credentials = creds
24
24
}
25
25
26
26
if region != "" {
27
- session_config .Config .Region = & region
27
+ sessionConfig .Config .Region = & region
28
28
} else {
29
- session_config .SharedConfigState = session .SharedConfigEnable
29
+ sessionConfig .SharedConfigState = session .SharedConfigEnable
30
30
}
31
31
32
- session , err := session .NewSessionWithOptions (session_config )
33
- if err != nil {
32
+ session , err := session .NewSessionWithOptions (sessionConfig )
33
+ if err != nil {
34
34
panic (err )
35
35
}
36
36
DynamoDB = dynamodb .New (session )
You can’t perform that action at this time.
0 commit comments