pkg/tsdb/cloudwatch/credentials.go: Remove unnecessary variable assignment

See,
pkg/tsdb/cloudwatch/credentials.go:45:2⚠️ should merge variable declaration with assignment on next line (S1021) (megacheck)
This commit is contained in:
Mario Trangoni 2018-09-30 18:53:20 +02:00
parent 236e0b3814
commit 6c190ab713

View File

@ -42,8 +42,7 @@ func GetCredentials(dsInfo *DatasourceInfo) (*credentials.Credentials, error) {
accessKeyId := "" accessKeyId := ""
secretAccessKey := "" secretAccessKey := ""
sessionToken := "" sessionToken := ""
var expiration *time.Time var expiration *time.Time = nil
expiration = nil
if dsInfo.AuthType == "arn" && strings.Index(dsInfo.AssumeRoleArn, "arn:aws:iam:") == 0 { if dsInfo.AuthType == "arn" && strings.Index(dsInfo.AssumeRoleArn, "arn:aws:iam:") == 0 {
params := &sts.AssumeRoleInput{ params := &sts.AssumeRoleInput{
RoleArn: aws.String(dsInfo.AssumeRoleArn), RoleArn: aws.String(dsInfo.AssumeRoleArn),