Skip to content

Commit

Permalink
Revert "chore: sig helper clone metadata"
Browse files Browse the repository at this point in the history
This reverts commit 9d62cbd.
  • Loading branch information
rscampos authored Sep 23, 2024
1 parent 27f3bcf commit 1733507
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions signatures/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package helpers

import (
"fmt"
"maps"
"strings"

"github.com/aquasecurity/tracee/types/detect"
"github.com/aquasecurity/tracee/types/trace"
)

Expand Down Expand Up @@ -437,13 +435,3 @@ func GetProtoHTTPByName(

return trace.ProtoHTTP{}, fmt.Errorf("protocol HTTP: type error (should be trace.ProtoHTTP, is %T)", arg.Value)
}

// CloneMetadataProperties makes a shallow clone of the Metadata
// Properties map, ensuring that there is always a new reference to it.
//
// TODO: since this helper is a workaround to avoid data races,
// perhaps a better solution would be to convert Properties into
// a concrete structure.
func CloneMetadataProperties(m *detect.SignatureMetadata) {
m.Properties = maps.Clone(m.Properties)
}

0 comments on commit 1733507

Please sign in to comment.