Compile Go programs for multiple OS (Windows, Linux and MacOS) (Golang)

Опубликовано: 25 Октябрь 2024
на канале: Zoran Stankovic
594
19

In this video, we will cover how to compile Go programs for multiple platforms. Explain GOOS and GOARCH environment variables. And also give an example of how to compile programs for Windows, Linux and Mac OS. #go #golang #coding #programming #tutorial #compiler #os

Link to my blog post: https://zoranstankovic.com/compile-pr...

Resources:
Link to the code example: https://go.dev/play/p/GiqGli23uLY

Chapters:
0:00 Intro
0:11 go build recap
1:23 Multiplatform builds
1:43 Two things to know before build
1:52 go env command
2:42 go env command with args
3:11 go tool command
4:03 Operating System table
4:22 go build commands for multiple platforms
6:14 file command
6:35 Outro

📣 Please leave a LIKE and SUBSCRIBE for more content! 📣

Follow me on:
🌍Website: https://zoranstankovic.com
📱Twitter:   / ryunosukezoran  
🔗Github: https://github.com/zoranstankovic