handle statement import of proto file
This commit is contained in:
18
examples/import/Makefile
Normal file
18
examples/import/Makefile
Normal file
@@ -0,0 +1,18 @@
|
||||
.PHONY: build
|
||||
build:
|
||||
mkdir -p output
|
||||
|
||||
# generate pb.go inluding imported proto
|
||||
protoc --go_out=Mproto/common.proto=github.com/moul/protoc-gen-gotemplate/examples/import/output/models/common:./output proto/article.proto
|
||||
protoc --go_out=,plugins=grpc:./output proto/common.proto
|
||||
|
||||
# build our go file based on our template
|
||||
protoc -I. --gotemplate_out=template_dir=templates,debug=true:output proto/article.proto
|
||||
|
||||
.PHONY: re
|
||||
re: clean build
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf output
|
Reference in New Issue
Block a user