Giter Site home page Giter Site logo

Cannot use 'loginHooks' (type *"github.com/bilibili/twirp".ServerHooks) as type *"github.com/twitchtv/twirp".ServerHooks about sniper HOT 3 CLOSED

go-kiss avatar go-kiss commented on May 8, 2024
Cannot use 'loginHooks' (type *"github.com/bilibili/twirp".ServerHooks) as type *"github.com/twitchtv/twirp".ServerHooks

from sniper.

Comments (3)

taoso avatar taoso commented on May 8, 2024

是不是引错包了。 sniper 依赖的是 github.com/bilibili/twirp 不是 github.com/twitchtv/twirp

from sniper.

learninto avatar learninto commented on May 8, 2024

使用go run cmd/sniper/main.go rpc生成的代码

cmd/server/http.go 中 引用的是 《"github.com/bilibili/twirp"》
rpc/shop/v1/service.twirp.go 引用的是 《import twirp "github.com/twitchtv/twirp"》

将 rpc/shop/v1/service.twirp.go 引用的twirp包改为:github.com/bilibili/twirp 报如下错误:
image

是不是引错包了。 sniper 依赖的是 github.com/bilibili/twirp 不是 github.com/twitchtv/twirp

from sniper.

taoso avatar taoso commented on May 8, 2024

请使用这个 protoc-gen-twirp,文档里已经有说明了。你应该用的是原版 protoc-gen-twirp

from sniper.

Related Issues (20)

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.