This commit is contained in:
C菌
2021-04-15 22:08:12 +08:00
commit f506f64266
10 changed files with 264 additions and 0 deletions

28
Makefile Normal file
View File

@@ -0,0 +1,28 @@
# https://eddycjy.com/posts/go/gin/2018-08-26-makefile/
.PHONY: build clean tool lint docker help
all: build
build:
go build -v .
tool:
go tool vet . |& grep -v vendor; true
gofmt -w .
lint:
golint ./...
clean:
rm -rf main helloworld
go clean -i .
docker:
docker build -t mirrors2/helloworld:latest .
help:
@echo "make: compile packages and dependencies"
@echo "make tool: run specified go tool"
@echo "make lint: golint ./..."
@echo "make clean: remove object files and cached files"
@echo "make docker: build docker image"