Created
May 2, 2023 00:09
-
-
Save unknowntpo/63dbacfe49d04f542d9a348604604261 to your computer and use it in GitHub Desktop.
Common Makefile with help message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: help | |
# ==================================================================================== # | |
# HELPERS | |
# ==================================================================================== # | |
## help: print this help message | |
.PHONY: help | |
help: | |
@echo 'Usage:' | |
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' | |
## mock/gen: generate mock $(IFASE) implementation against interface inside internal/domain, e.g. make mock/gen IFASE=PageUsecase | |
.PHONY: mock/gen | |
mock/gen: | |
mockgen -source ./domain/page.go \ | |
-destination ./domain/mock/$(IFASE).go \ | |
-package mock \ | |
$(IFASE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment