Go
Practical Go examples covering concurrency, errors, generics, cross-compilation, and Redis rate limiting.
Start here #
- Understand loop variables and goroutines
- Cross-compile Go and Cgo applications
- Build a rate limiter with Redis
All articles #
Fixed Window Rate Limit with Golang & Redis
·5 mins
Implement a fixed-window rate limiter in Go with Redis, including request counting, expiration, and HTTP middleware.
Golang Error: missing Location in call to Time.In
·3 mins
Learn to fix the `missing Location in call to Time.In` error in Go, particularly for Docker containers on Alpine Linux. This guide offers solutions through code adjustments and Dockerfile configurations for seamless timezone handling.
Golang Integer to String
·2 mins
How to convert an integer to a string in Golang
Go: Cross-Compilation Including Cgo
··4 mins
How to cross-compile applications for other platforms with Go and Cgo
Golang Errors With Stacktrace
·3 mins
Capture and inspect stack traces in Go with go-errors/errors to find where an error originated.
Golang Generic Option Type
·4 mins
Build a generic Option type in Go with Some, None, filtering, and fallback values using Go 1.18 generics.
Go Goroutine Loop Variables: Before and After Go 1.22
··3 mins
Understand goroutine loop-variable capture before and after Go 1.22, including shared variables and safe argument passing.