Makefiles For Golang Projects - Save Time And Build Faster!

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 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.

  • @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.

  • @sudo_garrett
    @sudo_garrett 6 หลายเดือนก่อน

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

  • @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!

  • @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!

  • @YounisLY
    @YounisLY ปีที่แล้ว +15

    God bless the algorithm

    • @cooljoe5305
      @cooljoe5305 9 หลายเดือนก่อน

      Again God bless the algorithm

    • @YounisLY
      @YounisLY 9 หลายเดือนก่อน

      ​@@cooljoe5305hallelujah

  • @jirapatmalai6138
    @jirapatmalai6138 ปีที่แล้ว +1

    Wow, Nicely done video! Thank you.

  • @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.

  • @thanhsangtran1470
    @thanhsangtran1470 4 วันที่ผ่านมา

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

  • @abdu5822
    @abdu5822 ปีที่แล้ว +2

    please more go content

  • @SuperMANTHER
    @SuperMANTHER 11 หลายเดือนก่อน

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

  • @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

  • @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).

  • @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 :)