Skip to content

Commit

Permalink
Merge 4a1f809 into c222579
Browse files Browse the repository at this point in the history
  • Loading branch information
dongxuny authored Sep 13, 2021
2 parents c222579 + 4a1f809 commit 916d322
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
# vendor/

.idea

coverage.txt
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
.PHONY: all
all: test lint readme fmt gomod
all: test lint doctoc fmt gomod

.PHONY: lint
lint:
@echo "running golangci-lint..."
@echo "[golangci-lint] Running golangci-lint..."
@golangci-lint run 2>&1
@echo "------------------------------------[Done]"

.PHONY: test
test:
@echo "running go test..."
@go test -race ./... 2>&1
@echo "[test] Running go test..."
@go test ./... -coverprofile coverage.txt 2>&1
@go tool cover -html=coverage.txt
@echo "------------------------------------[Done]"

.PHONY: fmt
fmt:
@echo "format go project..."
@echo "[fmt] Formatting go project..."
@gofmt -s -w . 2>&1
@echo "------------------------------------[Done]"

.PHONY: readme
readme:
@echo "running doctoc..."
.PHONY: doctoc
doctoc:
@echo "[doctoc] Running doctoc..."
@doctoc . 2>&1
@echo "------------------------------------[Done]"

.PHONY: gomod
gomod:
@echo "running gomod tidy..."
@go mod tidy
@echo "[go-mod] Running gomod tidy..."
@go mod tidy
@echo "------------------------------------[Done]"

0 comments on commit 916d322

Please sign in to comment.