Avatar
Hi, I'm Celso, a passionate Brazilian software engineer who thrives on creating and exploring innovative solutions. I specialize in web engineering and work at Globo, Brazil's leading television company, where I'm shaping the future of their CMS with a cutting-edge serverless platform. Every challenge is an opportunity to learn and push boundaries, and I’m constantly inspired to build systems that make a real impact.

Golang series: Chapter one - Installation & Introduction

Getting Started with Golang (Go)

Golang (Go) programming language logo

Hey everyone! Welcome to the first tutorial in my Go series. In this series, we’ll dive into Golang, or simply Go—a powerful, open-source programming language developed by Google.

Whether you’re on Windows, macOS, or Linux, you can follow along. Go is a cross-platform, general-purpose language with fast compilation, great concurrency support, and a vibrant community. It’s also open source—so you can even contribute to its evolution!


Why I Chose Go

I first heard about Go five years ago from a college friend working at a fintech startup. He said Go was super fast and easy to get into. I didn’t pay much attention back then.

Fast forward a year later, I started working at Globo, one of Brazil’s biggest media companies. Most of their backend systems are written in Go—handling high-traffic services with ease. That’s when I seriously began learning and working with Go, and I haven’t looked back since.


Is Go Hard to Learn?

Not at all. If you’ve worked with any other programming language, Go is straightforward to pick up.

Go avoids unnecessary complexity—it doesn’t have classes or inheritance. Instead, it uses packages and interfaces, promoting clean and simple design patterns.

It also introduces modern concepts like goroutines (for concurrency), pointers (without the pain), and efficient memory management through garbage collection.


Why Learn Go?

Here are a few reasons why Go might be the right language for you:

  • ✅ Easy to learn and read
  • ⚡ Fast compilation (Go is compiled to native binaries)
  • 🔗 Static linking (easy deployment without worrying about dependencies)
  • 🔄 Built-in concurrency with goroutines and channels
  • 🚀 Widely adopted by the industry (used by companies like Google, Netflix, Uber)
  • 🐹 A cute mascot called Gopher 😄
  • 🧹 Garbage collection built-in
  • 🌍 Fully open source and backed by a strong community
  • 🛠️ Excellent tooling (gofmt, vet, staticcheck, and more)

You might already be using products powered by Go without even realizing it! Some notable examples include:

  • Docker – Containerization platform
  • Kubernetes – Container orchestration system by Google
  • Dropbox – Migrated performance-critical components from Python to Go
  • Twitch, Netflix, Uber, PayPal – All use Go in production

Installing Go

Go can be installed on macOS, Linux, and Windows. Just follow the instructions for your OS below.

macOS

  1. Install Homebrew if you haven’t already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. Install Go:
brew install go

Linux

Depending on your Linux distribution, use one of the following:

Ubuntu / Debian

sudo apt update
sudo apt install -y golang

Fedora

sudo dnf install -y golang

Arch Linux

sudo pacman -S go

Alternatively, you can install Go manually:

  1. Download the binary from https://go.dev/dl/
  2. Extract it to /usr/local:
sudo tar -C /usr/local -xzf go1.x.x.linux-amd64.tar.gz
  1. Add Go to your path by editing ~/.profile, ~/.bashrc, or ~/.zshrc:
export PATH=$PATH:/usr/local/go/bin

Windows

If you’re using WSL (Windows Subsystem for Linux), follow the Linux steps above.

Otherwise:

  1. Download the MSI Installer from https://go.dev/dl/
  2. Double-click to run the installer and follow the instructions
  3. It will install Go at C:\Go and update your PATH environment variable automatically

Verifying Your Installation

To check if Go is installed correctly, run the following in your terminal or command prompt:

go version

Expected output:

go version go1.21.5 darwin/arm64

The version and architecture may vary depending on your OS or Go version.

If you don’t see a version, double-check that the Go binary is available in your PATH.


What’s Next?

In the next tutorial, we’ll write our first “Hello, World!” program using Go and explore how Go handles compilation, error messages, and project structure.

Thanks for reading! If you found this helpful, feel free to share and leave your feedback. Let’s build something cool with Go! 🧑‍💻🚀

all tags