Obiz Solutions

What is Go?

Go (Golang) is a language created by Google that compiles straight down to a single, self-contained binary — no runtime or VM required on the machine that runs it (unlike Java/Node, which need a JVM/Node runtime). It’s designed for fast builds and code that stays easy to read and maintain at scale.

Philosophy: simplicity over features

Go deliberately has fewer language features than TypeScript/Java/Rust — no complex generics (though basic generics arrived in Go 1.18), no try/catch exceptions (errors are returned as values instead of thrown), no classes/inheritance (structs + interfaces instead). The goal: code that’s easy to read and predict, so a new team member can understand it without needing to know hidden conventions.

Basic syntax

package main

import "fmt"

// Functions commonly return multiple values — used to return (result, error)
func divide(a, b int) (int, error) {
    if b == 0 {
        return 0, fmt.Errorf("division by zero")
    }
    return a / b, nil
}

func main() {
    result, err := divide(10, 2)
    if err != nil {
        fmt.Println("Error:", err)
        return
    }
    fmt.Println("Result:", result)
}

There are no exceptions — an error is just an ordinary return value, forcing the caller to handle it explicitly (if err != nil) instead of silently swallowing it the way a forgotten JS try/catch sometimes does.

Goroutines — lightweight concurrency

Go has goroutines: extremely lightweight units of concurrent execution, started by putting the go keyword in front of a function call:

go doSomething() // runs concurrently, doesn't block

Far lighter than OS threads (tens of thousands of goroutines can run at once), which is why so much infrastructure tooling (Docker, Kubernetes…) is written in Go — handling many things in parallel (many requests, many background tasks) without burning resources.

Compiling to one binary — why it matters

go build produces exactly one executable, with no external runtime dependency. This is the biggest difference from TypeScript (which still needs the Node.js runtime + node_modules to run): deploying a Go program is just copying one file — no Node version to worry about, no npm install needed on the target machine.

When Go is worth considering

  • Building a CLI tool or infrastructure utility that needs to deploy easily (copy one binary, no runtime to install)
  • Needing to handle many lightweight concurrent tasks (a network server, a batch worker)
  • Wanting performance close to a compiled language, with syntax simpler than C/C++/Rust

It’s a poor fit for frontend work (no DOM/browser APIs) or when you need a rich UI ecosystem like React — TypeScript remains the more natural choice there.

Further reading

Official docs: go.dev/doc