1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2024-11-25 09:35:39 +00:00

Merge pull request #97 from vbatts/carry_pr91

cmd/gomtree/main.go: Handle Extra and Missing cases
This commit is contained in:
Vincent Batts 2016-11-18 10:28:15 -05:00 committed by GitHub
commit 13131d516b

View file

@ -291,6 +291,10 @@ var formats = map[string]func([]mtree.InodeDelta) string{
for _, delta := range d { for _, delta := range d {
if delta.Type() == mtree.Modified { if delta.Type() == mtree.Modified {
fmt.Fprintln(&buffer, delta) fmt.Fprintln(&buffer, delta)
} else if delta.Type() == mtree.Missing {
fmt.Fprintln(&buffer, delta)
} else if delta.Type() == mtree.Extra {
fmt.Fprintln(&buffer, delta)
} }
} }
return buffer.String() return buffer.String()