Skip to main content

Command Palette

Search for a command to run...

Why I Chose Go - Getting Started with Golang

Updated
4 min read

“Simple, fast, and reliable.“

That’s how google engineers described Go when they introduced it to the world.

If you’re a developer like me exploring new backend technologies, you’ve probably heard about Golang, a language known for its speed, simplicity, and ability to handle high-performance systems.

In this post, I’ll share why I chose Go, how to set up your environment, and how to write your first Go program—step by step.

What is Go?

Go is a statically typed, compiled programming language developed by Google. It was created to address modern software development issues, such as managing large, complex codebases and leveraging multicore systems effectively.

The language combines the performance of lower-level languages like C++ with the simplicity and productivity of languages such as Python..

Key features of Go

  • Concurrency

    • It provides built-in support for concurrency, the ability to run multiple tasks simultaneously.

    • It uses lightweight threads called “goroutines” and communication channels to manage these tasks efficiently.

  • Simplicity and readability

    • Go has a clean, minimalist syntax that is easy for new developers to learn and for teams to maintain.

    • It enforces a consistent coding style across the entire Go ecosystem through tools like gofmt.

  • Fast compilation and execution

    • As a compiled language, Go produces native machine code, resulting in fast execution speed and rapid build times.
  • Static binaries and easy deployment

    • Go compiles into a single, static binary file that includes its own runtime, making deployment simple and portable across different platforms like Windows, macOS, and Linux.
  • Robust standard library

    • Go has a comprehensive standard library with a wide range of packages for common tasks like networking, web servers, and cryptography, reducing the need for external third-party libraries.
  • Memory safety

    • It features automatic memory management with a garbage collector, which reduces the risk of memory leaks and other common bugs.

When to choose Go

  • Cloud computing and microservices

    • Modern cloud-native tools like Docker, Kubernetes, and Terraform are written in Go.

    • Its lightweight nature and efficient concurrency make it ideal for microservices and cloud-based applications.

  • Backend services and APIs

    • It is well-suited for building high-performance web servers, APIs, and distributed systems that handle high volumes of simultaneous requests.
  • Command-line interfaces

    • Go's ability to compile into a single binary with no external dependencies makes it a great choice for creating fast and portable CLI tools.
  • DevOps and site reliability

    • Go's fast build times, simple syntax, and robust tooling make it a favorite for DevOps and site reliability engineers (SREs).
  • Data processing

    • With its concurrency model and memory efficiency, Go is well-suited for processing and analyzing large datasets in parallel.

Installing GO

Setting up Go is simple and quick

Step1: Download and Install

Go to the official site of go:

Download GO Installer

Choose the installer for your OS.

Step 2: Verify Installation

After Successfully installation, Open your terminal or command prompt and check below things.

go version

If everything went well, you’ll see below output

go version go1.25.0 darwin/arm64

Setting Up Your First Go Project

Let’s create a workspace for your projects.

mkdir go-learning
cd go-learning
mkdir hello-world && cd hello-world
go mod init hello-world

This commands will create a separate folder and Go module which helps manage dependencies and packages in your project.

Writing Your First Go Program

create a new file called main.go

package main
import "fmt"
func main() {
   fmt.Println("Hello World!!")
}

Now, run your code using below command from directory where that file is located.

go run main.go

Understanding the Program

Let’s break down what’s happening in our code:

  • package main → Every Go program starts with a package. The main package is special - it defines an executable program.

  • import “fmt” → Imports Go’s format package, which contains functions for input/output (like printing).

  • func main() → The entry point of every Go program. Execution starts here.

  • fmt.Println() → Prints text to the console with a new line.

Conclusion

Learning GO feels like unlocking a new way to think about programming—clean, fast, and efficient. It strips away unnecessary complexity and helps you focus on writing code that just works.

Starting with “Hello World!!“ might seem small, but it’s the first step toward mastering one of the most powerful modern languages shaping cloud computing and backend systems today.

In the next post, I’ll explore how Go handles variables, constants, and data types, the building blocks that make your programs truly dynamic. Stay tuned—this journey is just getting started.

Go Deep with Golang

Part 11 of 11

Go beyond the basics! This series explores how Go works under the hood — from memory management to goroutines, channels, and design principles that make Go ideal for modern backend development.

Start from the beginning

Listen, React, Repeat: Practical select Techniques in Go

A Complete Guide to Go’s select Statement: Evaluation Order, Blocking, Timeouts, and Cancellation