Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #160 from askuy/feature/dm
Browse files Browse the repository at this point in the history
upgrade ego to v0.7.0
  • Loading branch information
askuy authored Nov 24, 2021
2 parents 5c7746a + 9acc000 commit 3c9dcd1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions egorm/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package egorm

import (
"context"
"errors"
"fmt"

"github.com/gotomicro/ego-component/egorm/dsn"
"github.com/gotomicro/ego/core/elog"
Expand All @@ -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`
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 3c9dcd1

Please sign in to comment.