Makefiles For Golang Projects - Save Time And Build Faster!

preview_player
Показать описание

In this tutorial, we delve into the powerful world of build automation with Makefiles in Go (Golang) programming. Discover the essentials of using task runners for efficient software development, including how to streamline the process of compiling, running, testing, and cleaning up your code. Learn the best practices for development workflows and gain insight into how Makefiles can serve as an invaluable tool for automating the myriad of tasks developers encounter daily. By the conclusion of this video, you'll understand the enduring value of Makefiles in a modern development environment and how they contribute to coding best practices. Don't miss the chance to see why Makefiles, combined with Golang's cross-compilation capabilities, are a robust solution for developers looking to optimize their build processes and why they're widely embraced within the Go community.
Рекомендации по теме
Комментарии
Автор

I love make. It's pre installed on most unix-like OSs and its a nice consistent way to orchestrate stuff across languages/technologies.

boot-strapper
Автор

Thanks for sharing. I agree Makefile is very useful and recently I came across the `just` command which is a Makefile compatible alternative with a bunch more options (task docs, real default task definition, etc) which makes this workflow even better.

armanmirk
Автор

Thks for the video, great tip. I put you a 👍. I did a minor change to your Makefile:
BINARY_NAME=$(notdir $(shell pwd))
so that the binary takes the name of the folder where the Makefile is located and so I can reuse it without changes.

flevin
Автор

Make is a lifesaver for me when I do more involved backend projects in Go. A simple '$ make' bundles and minifies TailwindCSS, bundles and minifies Javascript for HTMX, AlpineJS and some special ‘homegrown’ Javascript elements, compiles one binary version for local testing and one for the use in Docker and builds a Docker container for cloud deployment -- all with one simple CLI command and a number of well-structured dependencies. Good luck trying all this without a well-written Makefile!

matthiaslangbart
Автор

Thanks for the video. I use Makefiles with cespare/reflex for hot reloading the server every time I save changes. It's very easy to do, and makes life easier

nodidog
Автор

fantastic video! I didn't know Go had a native make capability, the syntax is simple as always :)

sudo_garrett
Автор

There are some really interesting-looking features you have at the bottom of your VS Code instance, like the time spent coding and building. Would you be willing to share a list of those?

yates_
Автор

I've seen .PHONY section added to a golang makefile. Do you know the purpose for it in golang?

SuperMANTHER
Автор

How do you install "make" to run make file ?

thanhsangtran
Автор

Oh my god! You have a youtube channel? I started the video and that very instant I knew I've heard you somewhere 😂

whyredvince
Автор

Thanks, we need tutorials on how to create real projects (not just how to make a specific app and leave it on my machine).

dori
Автор

Have you tried using Bash/shell script instead of makefile?

ardawanx
visit shbcf.ru