-
Notifications
You must be signed in to change notification settings - Fork 80
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
fix: make JSON/YAML outputs consistent #622
Conversation
Looks very nice already! I noticed that all |
I don't think this is possible. You would need generic structs and generic type casts, none of which is possible in Go as of now. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
==========================================
+ Coverage 43.75% 46.27% +2.51%
==========================================
Files 171 171
Lines 7885 7456 -429
==========================================
Hits 3450 3450
+ Misses 4012 3583 -429
Partials 423 423 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rename this PR to change schema to json/yaml
? Not all users know the implementation details
🤖 I have created a release *beep* *boop* --- ## [1.41.0](v1.40.0...v1.41.0) (2023-12-13) ### Features * allow YAML output ([#628](#628)) ([87552d2](87552d2)) * **server:** allow to filter list by server status ([#629](#629)) ([1cb51f2](1cb51f2)), closes [#623](#623) ### Bug Fixes * make JSON/YAML outputs consistent ([#622](#622)) ([43944b8](43944b8)) * **server:** properly format request-console JSON output ([#626](#626)) ([40641b6](40641b6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This PR utilizes the new
hcloud -> schema
conversion methods introduced in hetznercloud/hcloud-go#343 to reduce boilerplate code and enforce consistent schema conversions (in combination with hetznercloud/hcloud-go#349 & hetznercloud/hcloud-go#348)Fixes #461