mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-12-01 21:44:23 +01:00
1 parent
8eb28cbb4c
commit
fad98cbde2
216 files changed
+27523
-3828
No files matched your search
+2
-3
@@ -26,6 +26,7 @@ var (
|
||||
ErrMaxTreeDepth = errors.New("maximum tree depth exceeded")
|
||||
ErrFileNotFound = errors.New("file not found")
|
||||
ErrDirectoryNotFound = errors.New("directory not found")
|
||||
ErrEntryNotFound = errors.New("entry not found")
|
||||
)
|
||||
|
||||
// Tree is basically like a directory - it references a bunch of other trees
|
||||
@@ -167,8 +168,6 @@ func (t *Tree) dir(baseName string) (*Tree, error) {
|
||||
return tree, err
|
||||
}
|
||||
|
||||
var errEntryNotFound = errors.New("entry not found")
|
||||
|
||||
func (t *Tree) entry(baseName string) (*TreeEntry, error) {
|
||||
if t.m == nil {
|
||||
t.buildMap()
|
||||
@@ -176,7 +175,7 @@ func (t *Tree) entry(baseName string) (*TreeEntry, error) {
|
||||
|
||||
entry, ok := t.m[baseName]
|
||||
if !ok {
|
||||
return nil, errEntryNotFound
|
||||
return nil, ErrEntryNotFound
|
||||
}
|
||||
|
||||
return entry, nil
|
||||
|
||||
Reference in new issue
Block a user