From 3411425d651e540cf19f9845d83cc507d929f2e6 Mon Sep 17 00:00:00 2001 From: deepoli <67894732+deepoil@users.noreply.github.com> Date: Tue, 18 Aug 2020 20:03:09 +0900 Subject: [PATCH] fix return value and delete unused default (#3280) --- chainable_api.go | 2 +- finisher_api.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/chainable_api.go b/chainable_api.go index 78724cc8..9b46a95b 100644 --- a/chainable_api.go +++ b/chainable_api.go @@ -69,7 +69,7 @@ func (db *DB) Distinct(args ...interface{}) (tx *DB) { if len(args) > 0 { tx = tx.Select(args[0], args[1:]...) } - return tx + return } // Select specify fields that you want when querying, creating, updating diff --git a/finisher_api.go b/finisher_api.go index 88873948..db069c5c 100644 --- a/finisher_api.go +++ b/finisher_api.go @@ -148,7 +148,6 @@ func (tx *DB) assignInterfacesToValue(values ...interface{}) { if field := tx.Statement.Schema.LookUpField(column.Name); field != nil { tx.AddError(field.Set(tx.Statement.ReflectValue, eq.Value)) } - default: } } }