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

Adds json response of version info #1262

Merged
merged 2 commits into from
May 17, 2023

Conversation

dgershman
Copy link
Contributor

What

This adds a flag to be able to return the response of the version command and return it as JSON.

Why

I couldn't find an easier way to parse out what the latest version of K3S that K3D is using easily.

Implications

This adds new behavior and should likely not impact any existing other CLI commands. It does not modify any pkg internals. No breaking changes.

@all-contributors please add @dgershman for code

Copy link
Member

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

Looks good, thank you! Just a small change regarding the flag name requested.

cmd/root.go Outdated Show resolved Hide resolved
@iwilltry42
Copy link
Member

@all-contributors please add @dgershman for code

@allcontributors
Copy link
Contributor

@iwilltry42

I've put up a pull request to add @dgershman! 🎉

@dgershman dgershman force-pushed the version-output-format-json branch 4 times, most recently from a36d180 to 3861916 Compare May 17, 2023 11:29
Copy link
Member

@iwilltry42 iwilltry42 left a comment

Choose a reason for hiding this comment

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

LGTM

@iwilltry42
Copy link
Member

Thank you! 🙏

@iwilltry42 iwilltry42 merged commit 5e582b8 into k3d-io:main May 17, 2023
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.

2 participants