error variable names should start with 'Err'

This commit is contained in:
Michael Eischer
2020-07-28 22:32:57 +02:00
parent b77e933d80
commit 1ede018ea6
4 changed files with 15 additions and 15 deletions

View File

@@ -270,7 +270,7 @@ func (f *Finder) findInSnapshot(ctx context.Context, sn *restic.Snapshot) error
Printf("Unable to load tree %s\n ... which belongs to snapshot %s.\n", parentTreeID, sn.ID())
return false, walker.SkipNode
return false, walker.ErrSkipNode
}
if node == nil {
@@ -314,7 +314,7 @@ func (f *Finder) findInSnapshot(ctx context.Context, sn *restic.Snapshot) error
if !childMayMatch {
ignoreIfNoMatch = true
errIfNoMatch = walker.SkipNode
errIfNoMatch = walker.ErrSkipNode
} else {
ignoreIfNoMatch = false
}
@@ -354,7 +354,7 @@ func (f *Finder) findIDs(ctx context.Context, sn *restic.Snapshot) error {
Printf("Unable to load tree %s\n ... which belongs to snapshot %s.\n", parentTreeID, sn.ID())
return false, walker.SkipNode
return false, walker.ErrSkipNode
}
if node == nil {

View File

@@ -222,7 +222,7 @@ func runLs(opts LsOptions, gopts GlobalOptions, args []string) error {
// otherwise, signal the walker to not walk recursively into any
// subdirs
if node.Type == "dir" {
return false, walker.SkipNode
return false, walker.ErrSkipNode
}
return false, nil
})