Skip to content

Commit 180fc4f

Browse files
committed
feat: fork
1 parent 0c9ffc9 commit 180fc4f

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Makefile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
GO ?= go
2+
GOFMT ?= gofmt "-s"
3+
GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*")
4+
VETPACKAGES ?= $(shell $(GO) list ./... | grep -v /vendor/ | grep -v /examples/)
5+
6+
.PHONY: build
7+
build: fmt-check
8+
$(GO) build -o app main.go
9+
10+
.PHONY: test
11+
test:
12+
$(GO) test -v -coverprofile=cover.out ./...
13+
14+
.PHONY: cover
15+
cover:
16+
$(GO) tool cover -func=cover.out -o cover_total.out
17+
$(GO) tool cover -html=cover.out -o cover.html
18+
19+
.PHONY: fmt
20+
fmt:
21+
$(GOFMT) -w $(GOFILES)
22+
23+
.PHONY: fmt-check
24+
fmt-check:
25+
@diff=$$($(GOFMT) -d $(GOFILES)); \
26+
if [ -n "$$diff" ]; then \
27+
echo "Please run 'make fmt' and commit the result:"; \
28+
echo "$${diff}"; \
29+
exit 1; \
30+
fi; \
31+
echo "\033[34m[Code] format perfect!\033[0m";
32+
33+
vet:
34+
$(GO) vet $(VETPACKAGES)
35+
36+
.PHONY: lint
37+
lint:
38+
golangci-lint run

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Gomail
2-
2+
[![build](https://github.com/verystar/gomail/actions/workflows/build.yml/badge.svg)](https://github.com/verystar/gomail/actions/workflows/build.yml)
33

44
Fork https://github.com/go-gomail/gomail
55

0 commit comments

Comments
 (0)