at v1.2.2-alpha 24 lines 456 B view raw
1package types 2 3import ( 4 "time" 5 6 "github.com/go-git/go-git/v5/plumbing" 7) 8 9// A nicer git tree representation. 10type NiceTree struct { 11 Name string `json:"name"` 12 Mode string `json:"mode"` 13 Size int64 `json:"size"` 14 IsFile bool `json:"is_file"` 15 IsSubtree bool `json:"is_subtree"` 16 17 LastCommit *LastCommitInfo `json:"last_commit,omitempty"` 18} 19 20type LastCommitInfo struct { 21 Hash plumbing.Hash 22 Message string 23 When time.Time 24}