check: implement "missing" failure type
If a file is missing, previously the check would simply fail. This allows you to get information even if files are missing from the tree. This also implements some of the wrappers required to add more failure states. Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
05161ec9df
commit
37060d602b
2 changed files with 114 additions and 12 deletions
|
|
@ -45,7 +45,7 @@ var formats = map[string]func(*mtree.Result) string{
|
|||
"text": func(r *mtree.Result) string {
|
||||
var buffer bytes.Buffer
|
||||
for _, fail := range r.Failures {
|
||||
fmt.Fprintf(&buffer, "modified\t%s\n", fail.Path)
|
||||
fmt.Fprintf(&buffer, "%s\t%s\n", fail.Type(), fail.Path())
|
||||
}
|
||||
return buffer.String()
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue