init
This commit is contained in:
20
Makefile
Normal file
20
Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
BINARY_NAME=server
|
||||
MAIN_PACKAGE_PATH = ./cmd/main.go
|
||||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
go mod tidy -v
|
||||
go fmt ./...
|
||||
|
||||
.PHONY: build
|
||||
build:
|
||||
go build -o bin/${BINARY_NAME} ${MAIN_PACKAGE_PATH}
|
||||
# GOARCH=arm64 GOOS=darwin go build -o bin/${BINARY_NAME} ${MAIN_PACKAGE_PATH}
|
||||
|
||||
.PHONY: run
|
||||
run: build
|
||||
./bin/${BINARY_NAME}
|
||||
|
||||
.PHONY: gen
|
||||
gen:
|
||||
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative proto/hello.proto
|
||||
Reference in New Issue
Block a user