File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 "os"
99 "path"
1010 "regexp"
11- "strconv"
1211 "strings"
1312 "time"
1413
@@ -259,25 +258,10 @@ func (d *DryccCmd) volumesClientLs(appID, vol string) error {
259258
260259 table := d .getDefaultFormatTable ([]string {})
261260 for _ , dir := range dirs {
262- var size string
263- s , err := strconv .ParseInt (dir .Size , 10 , 64 )
264- if err != nil {
265- return err
266- }
267261 if dir .Type == "dir" {
268- s = 4096
269262 dir .Name = fmt .Sprintf ("%s/" , dir .Name )
270263 }
271- if s > 1024 {
272- size = fmt .Sprintf ("%dKiB" , s / 1024 )
273- } else if s > 1024 * 1024 {
274- size = fmt .Sprintf ("%dMiB" , s / (1024 * 1024 ))
275- } else if s > 1024 * 1024 * 1024 {
276- size = fmt .Sprintf ("%dGiB" , s / (1024 * 1024 * 1024 ))
277- } else {
278- size = fmt .Sprintf ("%d" , s )
279- }
280- table .Append ([]string {fmt .Sprintf ("[%s]" , d .formatTime (dir .Timestamp )), size , dir .Name })
264+ table .Append ([]string {fmt .Sprintf ("[%s]" , d .formatTime (dir .Timestamp )), dir .Size , dir .Name })
281265 }
282266 table .Render ()
283267 return nil
You can’t perform that action at this time.
0 commit comments