Makefiles For Golang Projects - Save Time And Build Faster!

Поделиться
HTML-код
  • Опубликовано: 27 ноя 2024

Комментарии • 32

  • @boot-strapper
    @boot-strapper Год назад +6

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

  • @armanmirk
    @armanmirk Год назад +4

    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.

    • @EarthlyTech
      @EarthlyTech  Год назад

      just is quite nice as well. Works well as a task runner.

  • @nodidog
    @nodidog Год назад +1

    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

    • @EarthlyTech
      @EarthlyTech  Год назад

      Thanks for watching and for the reflex idea!

  • @flevin58
    @flevin58 Год назад +2

    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.

  • @matthiaslangbart9841
    @matthiaslangbart9841 Год назад +1

    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!

    • @EarthlyTech
      @EarthlyTech  Год назад

      Sounds like a great use of a Makefile!

  • @sudo_garrett
    @sudo_garrett 6 месяцев назад

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

  • @YounisLY
    @YounisLY Год назад +15

    God bless the algorithm

    • @cooljoe5305
      @cooljoe5305 9 месяцев назад

      Again God bless the algorithm

    • @YounisLY
      @YounisLY 9 месяцев назад

      ​@@cooljoe5305hallelujah

  • @SuperMANTHER
    @SuperMANTHER 11 месяцев назад

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

  • @jirapatmalai6138
    @jirapatmalai6138 Год назад +1

    Wow, Nicely done video! Thank you.

  • @thanhsangtran1470
    @thanhsangtran1470 День назад

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

  • @yates_
    @yates_ Год назад +3

    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?

    • @EarthlyTech
      @EarthlyTech  Год назад +2

      Hey, thanks for watching. That is WakaTime, but yes, it could be a good video idea. Thanks for suggesting it.

  • @abdu5822
    @abdu5822 Год назад +2

    please more go content

  • @dori8118
    @dori8118 Год назад +1

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

  • @whyredvince
    @whyredvince Год назад

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

    • @EarthlyTech
      @EarthlyTech  Год назад

      Yes I do! It's pretty new though, I'm just figuring things out.

    • @whyredvince
      @whyredvince Год назад

      @@EarthlyTech Great! Love your podcast!

  • @wisdomelue
    @wisdomelue Год назад

    good work

  • @ardawanx
    @ardawanx Год назад

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

    • @EarthlyTech
      @EarthlyTech  Год назад

      For sure. Bash is certainly useful as well.

  • @justin8mux
    @justin8mux Год назад

    subscribed :)