Tag

#Go

Every article tagged Go, in one place.

  • 10 articles
  • 10 min of reading
  • 03 Oct, 2026 last updated

Showing 10 articles

GoNew 1 min read

Go for Beginners: Why Go and Your First Program

Go is a small, compiled language designed at Google for building reliable server software. Docker, Kubernetes, Terraform and many cloud tools are written in it. Its appeal is simplicity: a small language, fast builds, a single static binary and great built-in...

03 Oct, 2026 Author 1.42K 70
Read article
Go 1 min read

Goroutines and Channels in Go Explained

A goroutine is a lightweight thread managed by the Go runtime. You can run hundreds of thousands of them. Channels let goroutines pass data safely. Start goroutines and wait for them var wg sync.WaitGroup urls := []string{"https://go.dev", "https://pkg.go.dev"...

15 Sep, 2026 Author 611 131
Read article
Go 1 min read

Build a REST API with Go's Standard Library

Go developers used to reach for a router package as soon as they needed path parameters. Since Go 1.22, the standard http.ServeMux supports HTTP methods and wildcards, which covers most APIs. The server package main import ( "encoding/json" "log" "net/http" "s...

09 Aug, 2026 Author 577 131
Read article
Go 1 min read

Generics in Go: Type Parameters by Example

Generics arrived in Go 1.18. They let you write functions and types that work for many types while staying type-safe, without falling back to interface{} and type assertions. A generic function func Map[T, U any](items []T, fn func(T) U) []U { out := make([]U,...

22 Jul, 2026 Author 364 104
Read article
Go 1 min read

Go Modules and Project Layout

A Go module is a collection of packages versioned together, defined by a go.mod file at its root. go.mod module github.com/acme/shop go 1.25 require ( github.com/jackc/pgx/v5 v5.7.1 golang.org/x/sync v0.10.0 ) Everyday commands go mod init github.com/acme/shop...

29 May, 2026 Author 255 94
Read article
Go 1 min read

Iterators in Go: Range Over Functions

Since Go 1.23, for range can loop over functions . This gives Go a standard way to write iterators for custom data structures, database rows or paginated APIs. The iterator types // package iter type Seq[V any] func(yield func(V) bool) type Seq2[K, V any] func...

11 May, 2026 Author 1.05K 32
Read article
Go 1 min read

Structured Logging in Go with log/slog

Plain text logs are hard to search at scale. Structured logs attach key-value fields to each message, so you can filter by user_id or status in your log platform. Go's standard library includes log/slog for this. Getting started import ( "log/slog" "os" ) func...

23 Apr, 2026 Author 968 53
Read article