WIP: allow update processes in cluster

This commit is contained in:
Ingo Oppermann
2023-05-12 12:59:01 +02:00
parent f3e410f4f5
commit 7d2b7b4836
18 changed files with 990 additions and 311 deletions

View File

@@ -58,3 +58,15 @@ func lineAndCharacter(input []byte, offset int) (line int, character int, err er
return line, character, nil
}
func ToNumber(f float64) json.Number {
var s string
if f == float64(int64(f)) {
s = fmt.Sprintf("%.0f", f) // 0 decimal if integer
} else {
s = fmt.Sprintf("%.3f", f) // max. 3 decimal if float
}
return json.Number(s)
}