File tree Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Expand file tree Collapse file tree 2 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,21 @@ func (info SortState) NextTypeSort() string {
84
84
func (info SortState ) NextSizeSort () string {
85
85
var nextKey byte
86
86
switch info .key {
87
- case sizeAsc :
88
- nextKey = sizeDesc
89
- default :
87
+ case sizeDesc :
90
88
nextKey = sizeAsc
89
+ default :
90
+ nextKey = sizeDesc
91
91
}
92
92
return info .mergeDirWithKey (nextKey )
93
93
}
94
94
95
95
func (info SortState ) NextTimeSort () string {
96
96
var nextKey byte
97
97
switch info .key {
98
- case timeAsc :
99
- nextKey = timeDesc
100
- default :
98
+ case timeDesc :
101
99
nextKey = timeAsc
100
+ default :
101
+ nextKey = timeDesc
102
102
}
103
103
return info .mergeDirWithKey (nextKey )
104
104
}
Original file line number Diff line number Diff line change @@ -52,24 +52,24 @@ func TestSortState_KeyState(t *testing.T) {
52
52
}
53
53
54
54
sortBy = state .NextSizeSort ()
55
- if sortBy != "/s " {
55
+ if sortBy != "/S " {
56
56
t .Error (sortBy )
57
57
}
58
58
59
59
sortBy = state .NextTimeSort ()
60
- if sortBy != "/t " {
60
+ if sortBy != "/T " {
61
61
t .Error (sortBy )
62
62
}
63
63
64
64
state .dirSort = dirSortMixed
65
65
sortBy = state .NextTimeSort ()
66
- if sortBy != "t " {
66
+ if sortBy != "T " {
67
67
t .Error (sortBy )
68
68
}
69
69
70
- state .key = 't '
70
+ state .key = 'T '
71
71
sortBy = state .NextTimeSort ()
72
- if sortBy != "T " {
72
+ if sortBy != "t " {
73
73
t .Error (sortBy )
74
74
}
75
75
}
You can’t perform that action at this time.
0 commit comments