From c6987b0364fef335922d50afcef08c2091662ea2 Mon Sep 17 00:00:00 2001 From: Miccah Castorina Date: Tue, 1 Aug 2023 21:08:32 -0500 Subject: [PATCH] Remove unused code --- pkg/engine/filesystem.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkg/engine/filesystem.go b/pkg/engine/filesystem.go index 7a5a1f331feb..9e26c75b1286 100644 --- a/pkg/engine/filesystem.go +++ b/pkg/engine/filesystem.go @@ -24,10 +24,7 @@ func (e *Engine) ScanFileSystem(ctx context.Context, c sources.FilesystemConfig) return err } - fileSystemSource := filesystem.Source{} - fileSystemSource.WithFilter(c.Filter) - - handle, err := e.sourceManager.Enroll(ctx, "trufflehog - filesystem", fileSystemSource.Type(), + handle, err := e.sourceManager.Enroll(ctx, "trufflehog - filesystem", new(filesystem.Source).Type(), func(ctx context.Context, jobID, sourceID int64) (sources.Source, error) { fileSystemSource := filesystem.Source{} fileSystemSource.WithFilter(c.Filter)