FRGet In Touch
← Tech stack

Go

A simple, fast, compiled programming language from Google, often called Golang, built for servers, APIs and cloud tools.

Type
Programming language
Created by
Google, open source (BSD license)
Ships as
A single compiled binary
In my stack
Backend APIs and services

What it is

Go is a compiled language designed at Google to make large server software simple to write, read and run. It is small on purpose: few features to learn, one official code format, and a standard library that already includes an HTTP server, JSON, cryptography and testing.

A Go program compiles to a single binary, with no runtime to install on the server. Goroutines, Go’s lightweight threads, make it cheap to handle thousands of requests or tasks at the same time. Much of the cloud is built with it: Docker, Kubernetes and Terraform are all written in Go.

Why I use it

It’s easy to read years later. Go code looks much the same whoever wrote it, which makes a backend easy to review, hand over and maintain.

Fast and light. It serves a lot of traffic with little memory, which keeps servers small and cloud costs down.

Concurrency is built in. Receiving data from many devices at once, running background jobs or calling several services in parallel is straightforward with goroutines and channels.

Simpler, safer deployments. One binary goes into a very small container image. Fewer packages in the image means fewer vulnerabilities for a scanner to report and less for an attacker to work with.

Fewer dependencies. The standard library covers most of what an API needs, so there is less third-party code to audit and keep up to date.

Where I use it

The backend of the HR management system is written in Go. It serves the API used by the React dashboard and the React Native mobile app, receives what devices recorded offline once they reconnect, stores it in PostgreSQL with Redis alongside, and records the audit trail. It runs in containers on Azure AKS and goes through the CI/CD pipeline, with OWASP ZAP scans on every deployment.

Best use cases

  • APIs and backends for web and mobile apps.
  • Services with many simultaneous connections: device sync, real-time updates, webhooks, queues.
  • Microservices and anything that runs in containers or on Kubernetes.
  • Command-line tools and DevOps automation, shipped as a single file with nothing else to install.

When I’d use something else

For data science and machine learning, Python’s libraries are far ahead. For a quick prototype that needs an admin panel and a lot of ready-made features on day one, a batteries-included framework like Django or Rails can be faster to start with.

A small example

A working JSON endpoint using only the standard library, no framework needed.

package main

import (
	"encoding/json"
	"log"
	"net/http"
)

type Inspection struct {
	ID     string `json:"id"`
	Site   string `json:"site"`
	Status string `json:"status"`
}

func main() {
	http.HandleFunc("POST /inspections", func(w http.ResponseWriter, r *http.Request) {
		var in Inspection
		if err := json.NewDecoder(r.Body).Decode(&in); err != nil {
			http.Error(w, "invalid JSON", http.StatusBadRequest)
			return
		}
		// save to PostgreSQL and write the audit trail entry
		w.WriteHeader(http.StatusCreated)
	})
	log.Fatal(http.ListenAndServe(":8080", nil))
}

Often used with

Need a fast, maintainable backend or API?

Get in touch and tell me about your project.