Skip to content
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

feat(update-collection-v3): order output keys based on input #425

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

swiatekm
Copy link

Order the keys in the output yaml based on the input yaml, recursively. Keys which aren't in the input yaml go to the end, and are sorted alphabetically.

I replaced https://pkg.go.dev/gopkg.in/yaml.v3 with https://pkg.go.dev/github.com/goccy/go-yaml to make this relatively painless. As a bonus, it looks like we could preserve comments, although I'd like to try doing that in a separate change.

@swiatekm swiatekm requested a review from a team as a code owner January 16, 2023 15:37
@swiatekm swiatekm force-pushed the feat/update-collection-v3/sort-keys branch from 54fc90f to 14d9c19 Compare January 16, 2023 15:45
Copy link
Contributor

@perk-sumo perk-sumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@swiatekm swiatekm force-pushed the feat/update-collection-v3/sort-keys branch from 14d9c19 to 9a077db Compare January 18, 2023 11:25
@swiatekm swiatekm enabled auto-merge (rebase) January 18, 2023 11:25
@swiatekm swiatekm merged commit 05662e3 into main Jan 18, 2023
@swiatekm swiatekm deleted the feat/update-collection-v3/sort-keys branch January 18, 2023 11:33
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.

None yet

2 participants