Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions reflect/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
// Fields returns a map of fields.
// Used for:
// - db.Updates()
// - sorting
func Fields(m any) (mp map[string]any) {
var inspect func(r any)
inspect = func(r any) {
Expand Down Expand Up @@ -49,12 +50,6 @@ func Fields(m any) (mp map[string]any) {
}
case reflect.Array:
continue
case reflect.Slice:
inst := fv.Interface()
switch inst.(type) {
case []byte:
mp[ft.Name] = fv.Interface()
}
Copy link
Contributor Author

@jortel jortel Aug 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hint: In the past json fields stored as []byte. Now json fields are stored as regular Go types (Eg: []string). This changed and the sort package did not get updated.

default:
mp[ft.Name] = fv.Interface()
}
Expand Down
Loading