From 7e03b6b0ecb7151843d29141a68b4ed3d1a4a616 Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Wed, 10 Oct 2018 19:40:50 +0530 Subject: [PATCH] Fix version data type and time format Signed-off-by: Noel Georgi --- cli/exec.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/exec.go b/cli/exec.go index 60a936e7b..2e4d23a09 100644 --- a/cli/exec.go +++ b/cli/exec.go @@ -34,7 +34,7 @@ type ExecCommandInput struct { } type AwsCredentialHelperData struct { - Version string `json:"Version"` + Version int `json:"Version"` AccessKeyID string `json:"AccessKeyId"` SecretAccessKey string `json:"SecretAccessKey"` SessionToken string `json:"SessionToken"` @@ -133,13 +133,13 @@ func ExecCommand(app *kingpin.Application, input ExecCommandInput) { if input.CredentialHelper { credentialData := AwsCredentialHelperData{ - Version: "1", + Version: 1, AccessKeyID: val.AccessKeyID, SecretAccessKey: val.SecretAccessKey, SessionToken: val.SessionToken, } if !input.NoSession { - credentialData.Expiration = time.Now().Add(input.Duration).Format("2006-01-02T15:04:05") + credentialData.Expiration = time.Now().Add(input.Duration).Format("2006-01-02T15:04:05Z") } json, err := json.Marshal(&credentialData) if err != nil {