mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
Store floating point number without decimal places.
Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com> Signed-off-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -278,7 +278,7 @@ func EncodeNonStrings(m map[string]interface{}) {
|
||||
// The JSON unserializer treats every number as a float, so the above 'if'
|
||||
// never applies in that situation.
|
||||
if vFloat, ok := v.(float64); ok {
|
||||
m["shamir_threshold"] = fmt.Sprintf("%g", vFloat)
|
||||
m["shamir_threshold"] = fmt.Sprintf("%.0f", vFloat)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user