Skip to content

Commit

Permalink
less verbose logging (#355)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
  • Loading branch information
wagoodman authored Feb 11, 2025
1 parent c09c416 commit a85b753
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/filetree/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,12 @@ func (sc *searchContext) buildLinkResolutionIndex() error {

func (sc searchContext) SearchByPath(path string, options ...LinkResolutionOption) (*file.Resolution, error) {
// TODO: one day this could leverage indexes outside of the tree, but today this is not implemented
log.WithFields("path", path).Trace("searching filetree by path")

options = append(options, FollowBasenameLinks)
_, ref, err := sc.tree.File(file.Path(path), options...)
return ref, err
}

func (sc searchContext) SearchByMIMEType(mimeTypes ...string) ([]file.Resolution, error) {
log.WithFields("types", mimeTypes).Trace("searching filetree by MIME types")

var fileEntries []IndexEntry

for _, mType := range mimeTypes {
Expand All @@ -115,8 +111,6 @@ func (sc searchContext) SearchByMIMEType(mimeTypes ...string) ([]file.Resolution
// add case for status.d/* like things that hook up directly into filetree.ListPaths()

func (sc searchContext) SearchByGlob(pattern string, options ...LinkResolutionOption) ([]file.Resolution, error) {
log.WithFields("glob", pattern).Trace("searching filetree by glob")

if sc.index == nil {
options = append(options, FollowBasenameLinks)
refs, err := sc.tree.FilesByGlob(pattern, options...)
Expand Down

0 comments on commit a85b753

Please sign in to comment.