Don't use pointers to int64 in function calls when not necessary

This commit is contained in:
Jeff Mitchell 2016-05-19 12:26:02 -04:00
parent 964916674e
commit 8f592f3442
2 changed files with 6 additions and 6 deletions

View file

@ -52,7 +52,7 @@ func (b *backend) pathSTSRead(
return b.assumeRole(
req.Storage,
req.DisplayName, policyName, policyValue,
&ttl,
ttl,
)
} else {
return logical.ErrorResponse(
@ -64,7 +64,7 @@ func (b *backend) pathSTSRead(
return b.secretTokenCreate(
req.Storage,
req.DisplayName, policyName, policyValue,
&ttl,
ttl,
)
}

View file

@ -71,7 +71,7 @@ func genUsername(displayName, policyName, userType string) (ret string, warning
func (b *backend) secretTokenCreate(s logical.Storage,
displayName, policyName, policy string,
lifeTimeInSeconds *int64) (*logical.Response, error) {
lifeTimeInSeconds int64) (*logical.Response, error) {
STSClient, err := clientSTS(s)
if err != nil {
return logical.ErrorResponse(err.Error()), nil
@ -83,7 +83,7 @@ func (b *backend) secretTokenCreate(s logical.Storage,
&sts.GetFederationTokenInput{
Name: aws.String(username),
Policy: aws.String(policy),
DurationSeconds: lifeTimeInSeconds,
DurationSeconds: &lifeTimeInSeconds,
})
if err != nil {
@ -113,7 +113,7 @@ func (b *backend) secretTokenCreate(s logical.Storage,
func (b *backend) assumeRole(s logical.Storage,
displayName, policyName, policy string,
lifeTimeInSeconds *int64) (*logical.Response, error) {
lifeTimeInSeconds int64) (*logical.Response, error) {
STSClient, err := clientSTS(s)
if err != nil {
return logical.ErrorResponse(err.Error()), nil
@ -125,7 +125,7 @@ func (b *backend) assumeRole(s logical.Storage,
&sts.AssumeRoleInput{
RoleSessionName: aws.String(username),
RoleArn: aws.String(policy),
DurationSeconds: lifeTimeInSeconds,
DurationSeconds: &lifeTimeInSeconds,
})
if err != nil {