From 9acc000cc563826ff592643b11376fd7a4cf37ee Mon Sep 17 00:00:00 2001 From: askuy Date: Wed, 24 Nov 2021 19:22:16 +0800 Subject: [PATCH] upgrade ego to v0.7.0 --- egorm/component.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/egorm/component.go b/egorm/component.go index 277cc24..ad39f34 100644 --- a/egorm/component.go +++ b/egorm/component.go @@ -2,8 +2,6 @@ package egorm import ( "context" - "errors" - "fmt" "github.com/gotomicro/ego-component/egorm/dsn" "github.com/gotomicro/ego/core/elog" @@ -16,7 +14,6 @@ import ( const PackageName = "component.egorm" var ( - errSlowCommand = errors.New("mysql slow command") // ErrRecordNotFound returns a "record not found error". Occurs only when attempting to query the database with a struct; querying with a slice won't return this error ErrRecordNotFound = gorm.ErrRecordNotFound // ErrInvalidTransaction occurs when you are trying to `Commit` or `Rollback` @@ -52,7 +49,6 @@ func WithContext(ctx context.Context, db *Component) *Component { // newComponent ... func newComponent(compName string, dsnParser dsn.DSNParser, config *config, elogger *elog.Component) (*Component, error) { db, err := gorm.Open(dsnParser.GetDialector(config.DSN), &gorm.Config{}) - fmt.Printf("err--------------->"+"%+v\n", err) if err != nil { return nil, err }