Removed debug statments

This commit is contained in:
Tristan Rice 2016-01-29 13:38:47 -08:00
parent f179cddafb
commit a80bfb8bc5
3 changed files with 2 additions and 10 deletions

View File

@ -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 {

View File

@ -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)
}
}

View File

@ -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...)
}
}