Skip to content

Commit 85961e3

Browse files
author
Xu Ao
committed
typo
1 parent 88a1818 commit 85961e3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

db/dbsession.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ var DynamoDB *dynamodb.DynamoDB
1212

1313
// GetDynamoSession returns a new dynamodb session
1414
func GetDynamoSession(accessKeyID, secretAccessKey, region string) *dynamodb.DynamoDB {
15-
session_config := session.Options{}
15+
sessionConfig := session.Options{}
1616
if accessKeyID != "" || secretAccessKey != "" {
1717
token := ""
1818
creds := credentials.NewStaticCredentials(accessKeyID, secretAccessKey, token)
1919
_, err := creds.Get()
2020
if err != nil {
2121
panic(err)
2222
}
23-
session_config.Config.Credentials = creds
23+
sessionConfig.Config.Credentials = creds
2424
}
2525

2626
if region != "" {
27-
session_config.Config.Region = &region
27+
sessionConfig.Config.Region = &region
2828
} else {
29-
session_config.SharedConfigState = session.SharedConfigEnable
29+
sessionConfig.SharedConfigState = session.SharedConfigEnable
3030
}
3131

32-
session, err := session.NewSessionWithOptions(session_config)
33-
if err != nil{
32+
session, err := session.NewSessionWithOptions(sessionConfig)
33+
if err != nil {
3434
panic(err)
3535
}
3636
DynamoDB = dynamodb.New(session)

0 commit comments

Comments
 (0)