mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
* feat: add basic files of contact * chore: code review 1. delete redundant suffix 2. use tab replace whitespace in pb file * chore: add some comments and check post data validation * chore: add some comments * chore: add publicapi.json and examples.json * chore: update README.md * fix: code review conversations
29 lines
579 B
Makefile
29 lines
579 B
Makefile
|
|
GOPATH:=$(shell go env GOPATH)
|
|
.PHONY: init
|
|
init:
|
|
go get -u github.com/golang/protobuf/proto
|
|
go get -u github.com/golang/protobuf/protoc-gen-go
|
|
go get github.com/micro/micro/v3/cmd/protoc-gen-micro
|
|
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi
|
|
|
|
.PHONY: api
|
|
api:
|
|
protoc --openapi_out=. --proto_path=. proto/contact.proto
|
|
|
|
.PHONY: proto
|
|
proto:
|
|
protoc --proto_path=. --micro_out=. --go_out=:. proto/contact.proto
|
|
|
|
.PHONY: build
|
|
build:
|
|
go build -o contact *.go
|
|
|
|
.PHONY: test
|
|
test:
|
|
go test -v ./... -cover
|
|
|
|
.PHONY: docker
|
|
docker:
|
|
docker build . -t contact:latest
|