Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add make run target to Makefile #375

Open
guruakashsm opened this issue Mar 25, 2025 · 3 comments · May be fixed by #376
Open

Add make run target to Makefile #375

guruakashsm opened this issue Mar 25, 2025 · 3 comments · May be fixed by #376

Comments

@guruakashsm
Copy link

The current Makefile in the repository provides various build, test, and linting targets but does not include a run target to execute the Go application. Adding a make run target would improve the developer experience by providing a simple and standardized way to start the application without manually running go run ..

Proposed Solution:
Modify the Makefile to include the following target:

.PHONY: run
run: ## Run the Go application
	go run .

This will allow developers to start the application with a single command:

make run

Would love to hear your thoughts on this! I'm happy to contribute a PR for this change if approved. 🚀

@guruakashsm guruakashsm linked a pull request Mar 25, 2025 that will close this issue
@pellared
Copy link
Member

pellared commented Mar 25, 2025

Thanks for creating the issue.

go run . is just one character longer than make run. What is the improved developer experience you are describing?

@pellared
Copy link
Member

Personally, I think the benefits are:

  • auto completion in Bash, zsh
  • possibility to add extend the target if more things are needed (e.g. some env vars, config etc) before the application is run

@guruakashsm
Copy link
Author

Thanks for your response! While go run . is only slightly longer, having a make run target provides a more standardized and extensible way to run the application.

Benefits:

  1. Consistency: Developers are already using make for build, test, and linting, so having make run maintains a uniform workflow.

  2. Autocompletion: make run benefits from shell autocompletion, making it even quicker to type.

  3. Extensibility: In the future, if additional setup (like setting env vars, loading configs, or running pre-start tasks) is needed, the run target can be easily modified without changing every developer’s workflow.

Would love to hear your thoughts on this! Happy to adjust the approach if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants