Skip to content
Open
Changes from all commits
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
3 changes: 1 addition & 2 deletions gorp.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ func columnToFieldIndex(m *DbMap, t reflect.Type, name string, cols []string) ([
colName := strings.ToLower(cols[x])
field, found := t.FieldByNameFunc(func(fieldName string) bool {
field, _ := t.FieldByName(fieldName)
cArguments := strings.Split(field.Tag.Get("db"), ",")
fieldName = cArguments[0]
fieldName, _, _ = strings.Cut(field.Tag.Get("db"), ",")

if fieldName == "-" {
return false
Expand Down