From a80bfb8bc5b3a1edf59853b04bde539b37d6b43c Mon Sep 17 00:00:00 2001 From: Tristan Rice Date: Fri, 29 Jan 2016 13:38:47 -0800 Subject: [PATCH] Removed debug statments --- callback_query.go | 2 -- query_test.go | 4 ++-- scope.go | 6 ------ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/callback_query.go b/callback_query.go index 453634b9..5473f232 100644 --- a/callback_query.go +++ b/callback_query.go @@ -83,8 +83,6 @@ func Query(scope *Scope) { scope.Err(rows.Scan(values...)) - //log.Println("result values", values) - for index, column := range columns { value := values[index] if field, ok := fields[column]; ok { diff --git a/query_test.go b/query_test.go index a7d5bc0e..51c1c5e2 100644 --- a/query_test.go +++ b/query_test.go @@ -31,8 +31,8 @@ func TestFirstAndLast(t *testing.T) { t.Errorf("Find first record as slice") } - if DB.Joins("left join emails on emails.user_id = users.id").First(&User{}).Error != nil { - t.Errorf("Should not raise any error when order with Join table") + if err := DB.Joins("left join emails on emails.user_id = users.id").First(&User{}).Error; err != nil { + t.Errorf("Should not raise any error when order with Join table: %s", err) } } diff --git a/scope.go b/scope.go index 0871842d..29354133 100644 --- a/scope.go +++ b/scope.go @@ -4,9 +4,7 @@ import ( "database/sql/driver" "errors" "fmt" - "log" "regexp" - "runtime/debug" "strings" "time" @@ -106,8 +104,6 @@ func (scope *Scope) Dialect() Dialect { // Err write error func (scope *Scope) Err(err error) error { if err != nil { - log.Println("ERR", err) - debug.PrintStack() scope.db.AddError(err) } return err @@ -365,8 +361,6 @@ func (scope *Scope) InstanceGet(name string) (interface{}, bool) { // Trace print sql log func (scope *Scope) Trace(t time.Time) { if len(scope.Sql) > 0 { - // TODO(d4l3k): Remove this line - log.Println("sql", scope.Sql, scope.SqlVars) scope.db.slog(scope.Sql, t, scope.SqlVars...) } }