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(cli): sort environments by name #521

Merged
merged 3 commits into from
Feb 22, 2021
Merged

Conversation

Duologic
Copy link
Member

I'd like to use the output of tk env list --json in various places and check if something has changed in the
environments metadata by comparing the output with standard diff tools. Due to the async nature of FindEnvs, the output
is random. This adds a sorting algorithm on that output so they are alphabetically sorted by name so we get consistent
output.

Copy link
Contributor

@jvrplmlmn jvrplmlmn left a comment

Choose a reason for hiding this comment

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

Nice 👍

I had one use case in which I had to solve this on my end, so would be nice to get sorting out of the box.

cmd/tk/env.go Outdated Show resolved Hide resolved
Co-authored-by: sh0rez <me@shorez.de>
@Duologic Duologic merged commit f88c104 into master Feb 22, 2021
@Duologic Duologic deleted the duologic/sort_env_list_json branch February 22, 2021 12:05
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

4 participants