Re: [go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Joop Kiefte
I suppose the best way is to use namespaced naming for the imported packages [Joop Kiefte - Chat @ Spike](https://spikenow.com/r/a/?ref=spike-organic-signature&_ts=pgu9m) [pgu9m] On September 30, 2020 at 17:47 GMT, Denis Cheremisov wrote: It is because you import protoc-gen-go generated

Re: [go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Denis Cheremisov
It is because you import protoc-gen-go generated entities with exactly the same package name and their own name. This is not allowed with protobuf, you can only have a single .. You can either use different names for error packages or use a 3rd repository with generated code. среда, 30

Re: [go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Vasiliy Tolstov
server https://github.com/unistack-org/micro-server-grpc client https://github.com/unistack-org/micro-client-grpc code used both repos https://github.com/unistack-org/micro-tests/tree/master/server/grpc ср, 30 сент. 2020 г. в 16:41, Joop Kiefte : > This seems to be because the protocol buffer

Re: [go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Joop Kiefte
This seems to be because the protocol buffer packages rely on shared state, kinda similar to the registration of database drivers in database/sql I would say (correct me if I'm wrong). I don't know how you import them, but you probably need a way to strictly separate the two in your program

[go-nuts] Re: protobuf avoid namespace conflict

2020-09-30 Thread Vasiliy Tolstov
So nobody knows how to deal with this? And if some projects have proto files with the same name - protobuf always complain about it? вт, 29 сент. 2020 г. в 10:50, Vasiliy Tolstov : > > Hi! I have two packages server and client. All belongs to different > repos. In this packages i have