Skip to content

Commit

Permalink
support for go1.11 (#7)
Browse files Browse the repository at this point in the history
* copy userhomedir and usercachedir implementation to be backward compatible with go1.11

* support only >= go1.12
  • Loading branch information
jkrajniak authored and mescam committed Oct 24, 2019
1 parent 9e119b7 commit c2e1fd5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- 1.11.x
- 1.12.x
- master
env:
- GO111MODULE=on
Expand Down
2 changes: 1 addition & 1 deletion cmd/assume-role-arn/creds_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ func getSessionHash(roleARN, profileName string) string {
h := sha256.New()
h.Write([]byte(fmt.Sprintf("%s-%s", roleARN, profileName)))
return fmt.Sprintf("%x", h.Sum(nil))
}
}
3 changes: 1 addition & 2 deletions cmd/assume-role-arn/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

var (
roleARN, roleName, externalID, mfa, mfaToken, awsProfileName string
verbose, ignoreCache bool
verbose, ignoreCache bool
)

func init() {
Expand Down Expand Up @@ -209,7 +209,6 @@ func main() {
logrus.SetLevel(logrus.ErrorLevel)
}


sessionHash := getSessionHash(roleARN, awsProfileName)
creds, err := readCredsFromCache(sessionHash)
if err != nil {
Expand Down

0 comments on commit c2e1fd5

Please sign in to comment.