Add -coverpkg to fix test coverage

Signed-off-by: knqyf263 <knqyf263@gmail.com>
diff --git a/Makefile b/Makefile
index d576778..3866fb7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,6 @@
 
 # Coverage
 COVERAGE_REPORT = coverage.txt
-COVERAGE_PROFILE = profile.out
 COVERAGE_MODE = atomic
 
 ifneq ($(origin CI), undefined)
@@ -37,16 +36,7 @@
 test-coverage:
 	@cd $(WORKDIR); \
 	echo "" > $(COVERAGE_REPORT); \
-	for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \
-		$(GOTEST) $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \
-		if [ $$? != 0 ]; then \
-			exit 2; \
-		fi; \
-		if [ -f $(COVERAGE_PROFILE) ]; then \
-			cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \
-			rm $(COVERAGE_PROFILE); \
-		fi; \
-	done; \
+	$(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./...
 
 clean:
 	rm -rf $(GIT_DIST_PATH)
\ No newline at end of file