Skip to content

Normalise the AWS policy document #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2016
Merged

Conversation

mtibben
Copy link
Member

@mtibben mtibben commented Sep 1, 2016

Normalises the AWS policy document when Marshaling and Unmarshaling to avoid conflicts when diffing. Fixes #13

The normalisation rules applied:

  1. slices of length 1 become single strings
  2. slices of length > 1 are sorted

I've needed to switch yaml implementation to github.com/ghodss/yaml which uses candiedyaml - not ideal, but unfortunately gopkg.in/yaml.v2 unmashals to map[interface{}]interface{} which json.Marshal can't handle. This is the same issue I created https://github.com/mtibben/yamljsonmap to address

However this seems to do the trick for now

@mtibben mtibben merged commit e11ff23 into master Sep 1, 2016
@mtibben mtibben deleted the policy-normalisation branch June 20, 2017 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant