Makefile 451 B

1234567891011121314151617
  1. default: check np
  2. .PHONY: clean
  3. clean: ## Clean up build artifacts
  4. rm -f np
  5. np: main.go ## Build the main binary
  6. go build -o np main.go
  7. check: ## Using staticcheck, ensure that the code matches best practices
  8. staticcheck main.go
  9. .PHONY: help
  10. help: ## Display this help message
  11. @echo "make(1) targets:"
  12. @grep -E '^[a-zA-Z_.-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'