-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (35 loc) · 758 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
.PHONY: buf-lint
buf-lint:
buf lint
.PHONY: buf-gen
buf-gen:
buf generate
.PHONY: run-server
run-server:
go run ./cmd/server/...
.PHONY: run-client
run-client:
go run ./cmd/client/...
.PHONY: lint-client
lint-client:
golangci-lint run ./cmd/client/...
.PHONY: lint-server
lint-server:
golangci-lint run ./cmd/server/...
.PHONY: test-server
test-server:
go test -race ./cmd/server/...
.PHONY: greet-curl
greet-curl:
curl \
--header "Content-Type: application/json" \
--data '{"name": "curl"}' \
https://localhost:8080/greet.v1.GreetService/Greet
.PHONY: greet-grpc
greet-grpc: SHELL:=/bin/bash
greet-grpc:
grpcurl \
-protoset <(buf build -o -) \
-plaintext \
-d '{"name": "grpcurl"}' \
localhost:8080 greet.v1.GreetService/Greet