Skip to content

Commit 9a16bb2

Browse files
committed
fixed int size
1 parent 29e298c commit 9a16bb2

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

tui/format.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ const (
2222
K int = 1e3
2323
M int = 1e6
2424
G int = 1e9
25-
T int = 1e12
26-
P int = 1e15
27-
E int = 1e18
2825
)
2926

3027
func (ui *UI) formatFileRow(item analyze.Item) string {
@@ -113,12 +110,6 @@ func (ui *UI) formatCount(count int) string {
113110
color := "[-::]"
114111

115112
switch {
116-
case count >= E:
117-
row += fmt.Sprintf("%.1f%sE", float64(count)/float64(E), color)
118-
case count >= P:
119-
row += fmt.Sprintf("%.1f%sP", float64(count)/float64(P), color)
120-
case count >= T:
121-
row += fmt.Sprintf("%.1f%sT", float64(count)/float64(T), color)
122113
case count >= G:
123114
row += fmt.Sprintf("%.1f%sG", float64(count)/float64(G), color)
124115
case count >= M:

tui/format_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,4 @@ func TestFormatCount(t *testing.T) {
2828
assert.Equal(t, "1.0[-::]k", ui.formatCount(1<<10))
2929
assert.Equal(t, "1.0[-::]M", ui.formatCount(1<<20))
3030
assert.Equal(t, "1.1[-::]G", ui.formatCount(1<<30))
31-
assert.Equal(t, "1.1[-::]T", ui.formatCount(1<<40))
32-
assert.Equal(t, "1.1[-::]P", ui.formatCount(1<<50))
33-
assert.Equal(t, "1.2[-::]E", ui.formatCount(1<<60))
3431
}

0 commit comments

Comments
 (0)