mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-21 23:00:42 -08:00
refactor(sbom): add intermediate representation for BOM (#6240)
Signed-off-by: knqyf263 <knqyf263@gmail.com> Co-authored-by: DmitriyLewen <91113035+DmitriyLewen@users.noreply.github.com>
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"regexp"
|
||||
"sync"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/samber/lo"
|
||||
"github.com/tetratelabs/wazero"
|
||||
"github.com/tetratelabs/wazero/api"
|
||||
@@ -235,8 +234,8 @@ func unmarshal(mem api.Memory, ptrSize uint64, v any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func marshal(ctx context.Context, m api.Module, malloc api.Function, v easyjson.Marshaler) (uint64, uint64, error) {
|
||||
b, err := easyjson.Marshal(v)
|
||||
func marshal(ctx context.Context, m api.Module, malloc api.Function, v any) (uint64, uint64, error) {
|
||||
b, err := json.Marshal(v)
|
||||
if err != nil {
|
||||
return 0, 0, xerrors.Errorf("marshal error: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user