cscli: add G (1e9) suffix to metric units (#2254)
This commit is contained in:
parent
d757cf8e84
commit
228e4f9acc
1 changed files with 7 additions and 24 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue