func GetRolesAndPolicies(verbose bool, svc *iam.Client) ([]IAMRole, map[string]IAMPolicyDocument) {
	roles := GetRoleDetails(verbose, svc)
	policies := make(map[string]IAMPolicyDocument)
	for _, role := range roles {
		for policyname, policy := range role.InlinePolicies {
			cleanedname := fmt.Sprintf("%s (inline for %s)", policyname, role.Name)
			policies[cleanedname] = *policy
		}
		for policyname, policy := range role.AttachedPolicies {
			policies[policyname] = *policy
		}
	}
	return roles, policies
}
// GetRolesAndPolicies returns all the roles and and their attached policies
GetRolesAndPolicies returns all the roles and and their attached policies
// GetRolesAndPolicies returns all the roles and and their attached policies
func GetRolesAndPolicies(verbose bool, svc *iam.Client) ([]IAMRole, map[string]IAMPolicyDocument) {
	roles := GetRoleDetails(verbose, svc)
	policies := make(map[string]IAMPolicyDocument)
	for _, role := range roles {
		for policyname, policy := range role.InlinePolicies {
			cleanedname := fmt.Sprintf("%s (inline for %s)", policyname, role.Name)
			policies[cleanedname] = *policy
		}
		for policyname, policy := range role.AttachedPolicies {
			policies[policyname] = *policy
		}
	}
	return roles, policies
}
func GetRolesAndPolicies ( verbose bool , svc * iam . Client ) ( [ ] IAMRole , map [ string ] IAMPolicyDocument ) { roles := GetRoleDetails ( verbose , svc ) policies := make ( map [ string ] IAMPolicyDocument ) for _ , role := range roles { for policyname , policy := range role . InlinePolicies { cleanedname := fmt . Sprintf ( " " , policyname , role . Name ) policies [ cleanedname ] = * policy } for policyname , policy := range role . AttachedPolicies { policies [ policyname ] = * policy } } return roles , policies }
GetRolesAndPolicies returns all the roles and and their attached policies
GetRolesAndPolicies returns all the roles and and their attached policies