SHELL = /bin/sh .PHONY: init init: @go get -u google.golang.org/protobuf/proto @go install github.com/golang/protobuf/protoc-gen-go@latest @go install github.com/asim/go-micro/cmd/protoc-gen-micro/v4@latest .PHONY: proto proto: @protoc -I ./api \ --go_out=:./api --go_opt=paths=source_relative \ --go-grpc_out=:./api --go-grpc_opt=paths=source_relative \ ./api/*.proto # --go-grpc_out=./proto --go-grpc_opt=paths=source_relative \ # --grpc-gateway_out=./proto --grpc-gateway_opt=paths=source_relative # grpc-gateway网关参数 .PHONY: update update: @go get -u .PHONY: tidy tidy: @go mod tidy .PHONY: build build: @go build -x -v -o tmp/ main.go