Output as expected json keys
This commit is contained in:
parent
0ace25c117
commit
729a84b4bf
|
@ -210,15 +210,15 @@ type Stat struct {
|
||||||
|
|
||||||
func (s *Stat) MarshalJSON() ([]byte, error) {
|
func (s *Stat) MarshalJSON() ([]byte, error) {
|
||||||
return json.Marshal(struct {
|
return json.Marshal(struct {
|
||||||
Name string
|
Name string `json:"name"`
|
||||||
Created string
|
Created string `json:"created"`
|
||||||
Modified string
|
Modified string `json:"modified"`
|
||||||
Mode string
|
Mode string `json:"mode"`
|
||||||
Size int64
|
Size int64 `json:"size"`
|
||||||
Directory bool
|
Directory bool `json:"directory"`
|
||||||
File bool
|
File bool `json:"file"`
|
||||||
Symlink bool
|
Symlink bool `json:"symlink"`
|
||||||
Mime string
|
Mime string `json:"mime"`
|
||||||
}{
|
}{
|
||||||
Name: s.Info.Name(),
|
Name: s.Info.Name(),
|
||||||
Created: s.CTime().String(),
|
Created: s.CTime().String(),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user