fix return value and delete unused default (#3280)

This commit is contained in:
deepoli 2020-08-18 20:03:09 +09:00 committed by GitHub
parent b5de8aeb42
commit 3411425d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -69,7 +69,7 @@ func (db *DB) Distinct(args ...interface{}) (tx *DB) {
if len(args) > 0 { if len(args) > 0 {
tx = tx.Select(args[0], args[1:]...) tx = tx.Select(args[0], args[1:]...)
} }
return tx return
} }
// Select specify fields that you want when querying, creating, updating // Select specify fields that you want when querying, creating, updating

View File

@ -148,7 +148,6 @@ func (tx *DB) assignInterfacesToValue(values ...interface{}) {
if field := tx.Statement.Schema.LookUpField(column.Name); field != nil { if field := tx.Statement.Schema.LookUpField(column.Name); field != nil {
tx.AddError(field.Set(tx.Statement.ReflectValue, eq.Value)) tx.AddError(field.Set(tx.Statement.ReflectValue, eq.Value))
} }
default:
} }
} }
} }