Add some comments in ls.go

This commit is contained in:
Harshavardhana
2015-06-08 02:17:22 -07:00
parent 58d832bcd0
commit 71b34e4347
+5
View File
@@ -38,13 +38,18 @@ const (
func parseContent(c *client.Content) Content {
content := Content{}
content.Time = c.Time.Local().Format(printDate)
// guess file type
content.Filetype = func() string {
if c.Type.IsDir() {
return "inode/directory"
}
return "application/octet-stream"
}()
content.Size = humanize.IBytes(uint64(c.Size))
// Convert OS Type to match console file printing style
content.Name = func() string {
switch {
case runtime.GOOS == "windows":