add a twitter service

This commit is contained in:
Asim Aslam
2020-12-29 20:56:57 +00:00
parent 10e679b161
commit 5cc36f5a3d
16 changed files with 3540 additions and 2 deletions

22
twitter/Makefile Normal file
View File

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