mirror of
https://github.com/anchore/syft.git
synced 2026-11-02 23:46:35 +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
+4
-4
@@ -71,11 +71,11 @@ type spaceDelimitedStringSlice []string
|
||||
|
||||
func (m *ApkDBEntry) UnmarshalJSON(data []byte) error {
|
||||
var fields []reflect.StructField
|
||||
t := reflect.TypeOf(ApkDBEntry{})
|
||||
t := reflect.TypeFor[ApkDBEntry]()
|
||||
for i := 0; i < t.NumField(); i++ {
|
||||
f := t.Field(i)
|
||||
if f.Name == "Dependencies" {
|
||||
f.Type = reflect.TypeOf(spaceDelimitedStringSlice{})
|
||||
f.Type = reflect.TypeFor[spaceDelimitedStringSlice]()
|
||||
}
|
||||
fields = append(fields, f)
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func (m *ApkDBEntry) UnmarshalJSON(data []byte) error {
|
||||
}
|
||||
|
||||
func (a *spaceDelimitedStringSlice) UnmarshalJSON(data []byte) error {
|
||||
var jsonObj interface{}
|
||||
var jsonObj any
|
||||
|
||||
if err := json.Unmarshal(data, &jsonObj); err != nil {
|
||||
return err
|
||||
@@ -103,7 +103,7 @@ func (a *spaceDelimitedStringSlice) UnmarshalJSON(data []byte) error {
|
||||
*a = strings.Split(obj, " ")
|
||||
}
|
||||
return nil
|
||||
case []interface{}:
|
||||
case []any:
|
||||
s := make([]string, 0, len(obj))
|
||||
for _, v := range obj {
|
||||
value, ok := v.(string)
|
||||
|
||||
Reference in New Issue
Block a user