cscli: add G (1e9) suffix to metric units (#2254)

This commit is contained in:
mmetc 2023-06-02 14:38:11 +02:00 committed by GitHub
parent d757cf8e84
commit 228e4f9acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -685,30 +685,13 @@ type unit struct {
}
var ranges = []unit{
{
value: 1e18,
symbol: "E",
},
{
value: 1e15,
symbol: "P",
},
{
value: 1e12,
symbol: "T",
},
{
value: 1e6,
symbol: "M",
},
{
value: 1e3,
symbol: "k",
},
{
value: 1,
symbol: "",
},
{value: 1e18, symbol: "E"},
{value: 1e15, symbol: "P"},
{value: 1e12, symbol: "T"},
{value: 1e9, symbol: "G"},
{value: 1e6, symbol: "M"},
{value: 1e3, symbol: "k"},
{value: 1, symbol: ""},
}
func formatNumber(num int) string {