Code Monkey home page Code Monkey logo

ego-component's Issues

ekafka关于打印日志的一个小bug

使用ekafka组件时发现一个小bug,不过不影响功能。producer使用writemessage时的日志输出为能打印出topic,起初我以为是我代码写错了,后来追到源码发现,如果发送消息时,不指定topic,默认使用config配置的topic,这时就无法输出topic。
interceptor_client.go 138行处。

[gomodule] driver包引用存在版本兼容问题

我按照ego-component的go.mod去选择的driver,在使用时,方法不兼容。

# gorm.io/driver/mysql
..\..\pkg\mod\gorm.io\driver\mysql@v1.2.3\migrator.go:224:38: cannot use column (variable of type Column) as gorm.ColumnType value in argument to append: Column does not implement gorm.ColumnType (missing m
ethod AutoIncrement)
# gorm.io/driver/sqlserver
..\..\pkg\mod\gorm.io\driver\sqlserver@v1.2.1\create.go:55:34: not enough arguments in call to field.ValueOf
        have (reflect.Value)
        want (context.Context, reflect.Value)
..\..\pkg\mod\gorm.io\driver\sqlserver@v1.2.1\create.go:61:36: not enough arguments in call to field.ValueOf
        want (context.Context, reflect.Value)
..\..\pkg\mod\gorm.io\driver\sqlserver@v1.2.1\sqlserver.go:90:22: invalid operation: limit.Limit > 0 (mismatched types *int and untyped int)
..\..\pkg\mod\gorm.io\driver\sqlserver@v1.2.1\sqlserver.go:95:39: cannot use limit.Limit (variable of type *int) as int value in argument to strconv.Itoa
# gorm.io/driver/postgres
..\..\pkg\mod\gorm.io\driver\postgres@v1.2.3\migrator.go:341:38: cannot use column (variable of type Column) as gorm.ColumnType value in argument to append: Column does not implement gorm.ColumnType (missin
g method AutoIncrement)

以上依赖问题,是由ego的相关包触发的,依据是

> go mod why gorm.io/driver/postgres
gorm.io/driver/postgres
xxxapisrv/utils/db
github.com/gotomicro/ego-component/egorm
github.com/gotomicro/ego-component/egorm/internal/dsn
gorm.io/driver/postgres
> go mod why gorm.io/driver/mysql 
xxxapisrv/utils/db
github.com/gotomicro/ego-component/egorm
github.com/gotomicro/ego-component/egorm/internal/dsn
gorm.io/driver/mysql
> go mod why gorm.io/driver/sqlserver
github.com/gotomicro/ego-component/egorm
github.com/gotomicro/ego-component/egorm/internal/dsn
gorm.io/driver/sqlserver

其中, 版本的选择依据为最新版本组件的go.mod https://github.com/gotomicro/ego-component/blob/master/egorm/go.mod
gorm.io\driver\[email protected]
gorm.io\driver\[email protected]
gorm.io\driver\[email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.