Created
February 10, 2022 14:13
-
-
Save jpukg/244ebcc2ddaa5777b9ac2269fd124b1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
roles, err := svc.ListRoles(&iam.ListRolesInput{}) | |
var jsonMap map[string]interface{} | |
unquote, err := url.PathUnescape(aws.StringValue(roles.Roles[0].AssumeRolePolicyDocument)) | |
json.Unmarshal([]byte(unquote), &jsonMap) | |
data := model.Statement{} | |
json.Unmarshal([]byte(aws.StringValue(roles.Roles[0].AssumeRolePolicyDocument)), &data) | |
fmt.Printf("Operation: %s", data) | |
fmt.Println(roles) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment