From ae0399ca95ee78b6959396dbd0448581d8f63d70 Mon Sep 17 00:00:00 2001 From: knqyf263 Date: Thu, 16 Nov 2023 14:49:00 +0900 Subject: [PATCH] refactor: remove option.Init() Signed-off-by: knqyf263 --- pkg/fanal/artifact/artifact.go | 6 ------ pkg/fanal/artifact/sbom/sbom.go | 1 - 2 files changed, 7 deletions(-) diff --git a/pkg/fanal/artifact/artifact.go b/pkg/fanal/artifact/artifact.go index 41f22afedd26..b8245f585389 100644 --- a/pkg/fanal/artifact/artifact.go +++ b/pkg/fanal/artifact/artifact.go @@ -41,12 +41,6 @@ type Option struct { WalkerOption walker.Option } -func (o *Option) Init() { - if o.Parallel == 0 { - o.Parallel = 5 // Set the default value - } -} - func (o *Option) AnalyzerOptions() analyzer.AnalyzerOptions { return analyzer.AnalyzerOptions{ Group: o.AnalyzerGroup, diff --git a/pkg/fanal/artifact/sbom/sbom.go b/pkg/fanal/artifact/sbom/sbom.go index 7981e6e793d9..e788e14b48db 100644 --- a/pkg/fanal/artifact/sbom/sbom.go +++ b/pkg/fanal/artifact/sbom/sbom.go @@ -29,7 +29,6 @@ type Artifact struct { } func NewArtifact(filePath string, c cache.ArtifactCache, opt artifact.Option) (artifact.Artifact, error) { - opt.Init() return Artifact{ filePath: filepath.Clean(filePath), cache: c,