Skip to content

Commit

Permalink
refactor(module): update module PostScan to use types.Results
Browse files Browse the repository at this point in the history
- Replace `serialize.Results` with `types.Results` in module test files
- Update import statements to use `types.Results`
- Maintain consistency with previous type migration efforts
- Simplify type imports for module test data
  • Loading branch information
knqyf263 committed Mar 6, 2025
1 parent 735643e commit 13b21f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pkg/module/testdata/happy/happy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/aquasecurity/trivy/pkg/module/api"
"github.com/aquasecurity/trivy/pkg/module/serialize"
"github.com/aquasecurity/trivy/pkg/module/wasm"
"github.com/aquasecurity/trivy/pkg/types"
)

const (
Expand Down Expand Up @@ -44,6 +45,6 @@ func (HappyModule) PostScanSpec() serialize.PostScanSpec {
}
}

func (HappyModule) PostScan(_ serialize.Results) (serialize.Results, error) {
func (HappyModule) PostScan(_ types.Results) (types.Results, error) {
return nil, nil
}
3 changes: 2 additions & 1 deletion pkg/module/testdata/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/aquasecurity/trivy/pkg/module/api"
"github.com/aquasecurity/trivy/pkg/module/serialize"
"github.com/aquasecurity/trivy/pkg/module/wasm"
"github.com/aquasecurity/trivy/pkg/types"
)

const (
Expand Down Expand Up @@ -36,6 +37,6 @@ func (PostScannerModule) PostScanSpec() serialize.PostScanSpec {
}
}

func (PostScannerModule) PostScan(_ serialize.Results) (serialize.Results, error) {
func (PostScannerModule) PostScan(_ types.Results) (types.Results, error) {
return nil, nil
}

0 comments on commit 13b21f1

Please sign in to comment.