mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
chore(deps): update Go version (#4773)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com> Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
This commit is contained in:
co-authored by
anchore-oss-update-bot
parent
26e87c7cd3
commit
5b58ec96b7
@@ -41,7 +41,7 @@ func (cfg configurationAuditTrail) MarshalJSON() ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var dataMap map[string]interface{}
|
||||
var dataMap map[string]any
|
||||
if err := json.Unmarshal(initialJSON, &dataMap); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -55,13 +55,13 @@ func (cfg configurationAuditTrail) MarshalJSON() ([]byte, error) {
|
||||
}
|
||||
|
||||
// marshalSorted recursively marshals a map with sorted keys
|
||||
func marshalSorted(m interface{}) ([]byte, error) {
|
||||
func marshalSorted(m any) ([]byte, error) {
|
||||
if reflect.TypeOf(m).Kind() != reflect.Map {
|
||||
return json.Marshal(m)
|
||||
}
|
||||
|
||||
val := reflect.ValueOf(m)
|
||||
sortedMap := make(map[string]interface{})
|
||||
sortedMap := make(map[string]any)
|
||||
|
||||
for _, key := range val.MapKeys() {
|
||||
value := val.MapIndex(key).Interface()
|
||||
|
||||
Reference in New Issue
Block a user