feat: add joke api (#294)

* feat: add joke api
close #124

* chore: count boundary

* fix: bug fix
chore: update README.md

* feat: add publicapi.json
This commit is contained in:
zhaoyang
2021-12-08 18:38:03 +08:00
committed by GitHub
parent 1688a9efdd
commit 72827704d2
15 changed files with 787 additions and 0 deletions

28
joke/Makefile Normal file
View File

@@ -0,0 +1,28 @@
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/joke.proto
.PHONY: proto
proto:
protoc --proto_path=. --micro_out=. --go_out=:. proto/joke.proto
.PHONY: build
build:
go build -o joke *.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t joke:latest