protoc-gen-gorm
protoc-gen-gorm copied to clipboard
get "protoc-gen-gogo: error:inconsistent package import paths" errors
project structure:
shop/v1/shop.proto:
shop/v1/service/shop.proto:
protoc cmd:
protoc --proto_path=. \
--proto_path=./third_party \
--go_out=paths=source_relative:. \
--gorm_out=paths=source_relative:. \
--validate_out=paths=source_relative,lang=go:. \
--go-http_out=paths=source_relative:. \
--go-grpc_out=paths=source_relative:. \
--openapiv2_out . \
--openapiv2_opt logtostderr=true \
--openapiv2_opt json_names_for_fields=false \
$(shell find api/shop -name *.proto)
will get this errors:
protoc-gen-gogo: error:inconsistent package import paths: "my.example-domain.com/api/shop/v1", "my.example-domain.com/api/shop/v1/service"
--gorm_out: protoc-gen-gorm: Plugin failed with status code 1.
if delete --gorm_out=paths=source_relative:. \
this line in protoc cmd. it will works fine.