rpcxio / protoc-gen-gogorpcx Goto Github PK
View Code? Open in Web Editor NEWprotobuf code generator plugin to create rpcx code
License: BSD 3-Clause "New" or "Revised" License
protobuf code generator plugin to create rpcx code
License: BSD 3-Clause "New" or "Revised" License
protoc --gogofaster_out=plugins=rpcx:. *.proto 出来的代码报错
There is an err when use
protoc --gofast_out=plugins=rpcx:. ...
MarshalToSizedBuffer undefined (type *anypb.Any has no field or method MarshalToSizedBuffer)
我看gogo/protobuf的issue还是显示open,还有其他解决吗,我只是想要一个map<string,repeated string>
类型. 😭
执行了以下安装命令,还是报错
`$ go get github.com/rpcxio/protoc-gen-gogorpcx/protoc-gen-gofast
go: downloading github.com/rpcxio/protoc-gen-gogorpcx v0.2.1
go: added github.com/rpcxio/protoc-gen-gogorpcx v0.2.1`
错误:
`$ protoc --gofast_out=plugins=rpcx:. hello.proto
protoc-gen-gofast: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--gofast_out: protoc-gen-gofast: Plugin failed with status code 1.
`
我看了PATH里确实没有 protoc-gen-gofast 这个可执行文件,GOPATH下是有github.com/rpcxio/protoc-gen-gogorpcx 的代码的,只是没有可执行的文件
嘗試先用指令安裝
go get github.com/rpcxio/protoc-gen-gogorpcx/protoc-gen-gogofast
然後跑
protoc --gofast_out=plugins=rpcx:. helloworld.proto
只有產生 message 的程式碼
安装 readme 的例子。生成的 pb.go 并没有 NewXClientForGreeter函数
生成的代码还是依赖"github.com/smallnest/rpcx",如何处理?
go version:go1.14.9
os:windows 7
D:\cmder
λ go get github.com/rpcxio/protoc-gen-gogorpcx/protoc-gen-gofast
go: downloading github.com/rpcxio/protoc-gen-gogorpcx v0.0.0-20200921090426-0684feea2433
go: found github.com/rpcxio/protoc-gen-gogorpcx/protoc-gen-gofast in github.com/rpcxio/protoc-gen-gogorpcx v0.0.0-20200921090426-0684feea2433
go: finding module for package github.com/gogo/protobuf/vanity
go: finding module for package github.com/gogo/protobuf/plugin/equal
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/plugin
go: finding module for package github.com/gogo/protobuf/plugin/compare
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/grpc
go: finding module for package github.com/gogo/protobuf/plugin/face
go: finding module for package github.com/gogo/protobuf/plugin/unmarshal
go: finding module for package github.com/gogo/protobuf/plugin/oneofcheck
go: finding module for package github.com/gogo/protobuf/plugin/size
go: finding module for package github.com/gogo/protobuf/plugin/union
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/generator
go: finding module for package github.com/gogo/protobuf/plugin/description
go: finding module for package github.com/gogo/protobuf/plugin/testgen
go: finding module for package github.com/gogo/protobuf/proto
go: finding module for package github.com/gogo/protobuf/plugin/embedcheck
go: finding module for package github.com/gogo/protobuf/plugin/gostring
go: finding module for package github.com/gogo/protobuf/plugin/populate
go: finding module for package github.com/gogo/protobuf/plugin/enumstringer
go: finding module for package github.com/gogo/protobuf/plugin/stringer
go: finding module for package github.com/gogo/protobuf/plugin/marshalto
go: finding module for package github.com/gogo/protobuf/plugin/defaultcheck
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/descriptor
go: finding module for package github.com/gogo/protobuf/vanity
go: finding module for package github.com/gogo/protobuf/plugin/equal
go: finding module for package github.com/gogo/protobuf/plugin/unmarshal
go: finding module for package github.com/gogo/protobuf/plugin/marshalto
go: finding module for package github.com/gogo/protobuf/plugin/description
go: finding module for package github.com/gogo/protobuf/plugin/stringer
go: finding module for package github.com/gogo/protobuf/plugin/defaultcheck
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/plugin
go: finding module for package github.com/gogo/protobuf/plugin/populate
go: finding module for package github.com/gogo/protobuf/plugin/oneofcheck
go: finding module for package github.com/gogo/protobuf/plugin/embedcheck
go: finding module for package github.com/gogo/protobuf/proto
go: finding module for package github.com/gogo/protobuf/plugin/face
go: finding module for package github.com/gogo/protobuf/plugin/union
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/grpc
go: finding module for package github.com/gogo/protobuf/plugin/enumstringer
go: finding module for package github.com/gogo/protobuf/plugin/testgen
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/generator
go: finding module for package github.com/gogo/protobuf/plugin/size
go: finding module for package github.com/gogo/protobuf/plugin/compare
go: finding module for package github.com/gogo/protobuf/plugin/gostring
go: finding module for package github.com/gogo/protobuf/protoc-gen-gogo/descriptor
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:38:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/compare
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:39:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/defaultcheck
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:40:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/description
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:41:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/embedcheck
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:42:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/enumstringer
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:43:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/equal
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:44:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/face
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:45:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/gostring
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:46:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/marshalto
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:47:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/oneofcheck
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:48:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/populate
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:49:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/size
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:50:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/stringer
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:51:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/testgen
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:52:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/union
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:53:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/plugin/unmarshal
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:54:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/proto
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\rpcx\rpcx.go:7:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/protoc-gen-gogo/descriptor
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:55:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/protoc-gen-gogo/generator
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:56:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/protoc-gen-gogo/grpc C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\command\command.go:57:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/protoc-gen-gogo/plugin
C:\Users\Administrator\go\pkg\mod\github.com\rpcxio\[email protected]\protoc-gen-gofast\main.go:32:2: module github.com/gogo/protobuf@latest found (v1.3.1), but does not contain package github.com/gogo/protobuf/vanity
D:\cmder
λ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.