removed spew dumps

This commit is contained in:
Sebastian Frank 2021-03-01 13:53:26 +01:00
parent c73033684a
commit 161e3b46fb
Signed by: apairon
GPG Key ID: 7270D06DDA7FE8C3
3 changed files with 5 additions and 6 deletions

View File

@ -7,20 +7,22 @@ import (
"strings"
"time"
"github.com/davecgh/go-spew/spew"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
// ErrorWithStack is error which stored its stack trace
type ErrorWithStack struct {
Message string
StackTrace string
}
// Error returns error message
func (e *ErrorWithStack) Error() string {
return e.Message
}
// Stack returns strack trace to error origin
func (e *ErrorWithStack) Stack() string {
return e.StackTrace
}
@ -181,7 +183,7 @@ func ReadCollection(db *mgo.Database, results interface{}, filter bson.M, select
sortM[s] = 1
}
}
spew.Dump(sortM)
// spew.Dump(sortM)
pipeline = append(pipeline, bson.M{
"$sort": sortM,
})
@ -214,7 +216,7 @@ func ReadCollection(db *mgo.Database, results interface{}, filter bson.M, select
idToObjectID(filter)
spew.Dump(filter)
// spew.Dump(filter)
q := c.Find(filter)
if selector != nil {

1
go.mod
View File

@ -3,7 +3,6 @@ module gitbase.de/gopackage/mgocrud
go 1.16
require (
github.com/davecgh/go-spew v1.1.1
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
gopkg.in/go-playground/assert.v1 v1.2.1 // indirect
gopkg.in/go-playground/validator.v8 v8.18.2

2
go.sum
View File

@ -1,5 +1,3 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=