fix: Distinct between float and integer when printing YAML format #89
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Since version v0.0.97 a regression has occurred where we stopped printing integer values correctly. Instead of printing them as integers we always printed every number as a float.
The main culprit of this regression was a switch to SDK-based parsing methods which utilized a new YAML library.
Related changes
Fixed in: nobl9/nobl9-go#347.
Testing
Run
sloctl get
on objects which operate on ints and floats like Alert Policy or Agent.Release Notes
Fixed regression in printing YAML output for
sloctl get
commands which caused integers to be displayed as floats (ex.1.0
instead of1
). The regression was introduced in versionv0.0.97
.