简体   繁体   中英

Error to generate micro-go code - --go_out: protoc-gen-go: unknown plugin “micro”

I have to generate bin folder into my project through a makefile, but when i type 'make build' at the directory where makefile is, protoc-gen-go returns an error to me:

--go_out: protoc-gen-go: unknown plugin "micro"
make: *** [build] Error 1

the build block:

protoc -I. --go_out=plugins=micro:$(shell pwd) \
    proto/version/version.proto

micro was installed at /Users/wendelrios/bin/micro

Can someone explain to me whats wrong and whats happening?

I got it. protoc , protoc-gen-go and protoc-gen-micro should be in /Users/user_name/go/bin The command below worked for me:

protoc --plugin=protoc-gen-go=/Users/wendelrios/go/bin/protoc-gen-go --plugin=protoc-gen-micro=/Users/wendelrios/go/bin/protoc-gen-micro -I. --micro_out=. --go_out=. proto/version/version.proto

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM