Skip to content
random thoughts
  • Posts
  • Tags
  • About

Tags

Golang

7 posts

  • Jan 25, 2025

    Understanding HTTP/1.1: Redirects in Go (Part 3)

    301 vs 302 vs 307 vs 308 — which HTTP redirect to use, which ones browsers cache, which preserve the request method, tested against a small Go server.

  • Dec 28, 2024

    Understanding HTTP/1.1: Content-Type in Go (Part 2)

    How the Content-Type header decides what a browser does with your response, plus a hand-rolled http.ResponseWriter implementation in Go.

  • Dec 12, 2024

    Understanding HTTP/1.1: TCP Server in Go (Part 1)

    Build a raw TCP server in Go, inspect what curl and a browser actually send over the wire, and hand-craft a valid HTTP/1.1 response.

  • Sep 14, 2023

    Structured Logging in Go with log/slog

    Getting started with log/slog, Go 1.21's standard-library structured logger — levels, handlers, wrapping the logger, writing to a file, and go vet gotchas.

  • Aug 20, 2023

    Trace Logging in Golang

    Add a TRACE log level to a Go program to observe code execution paths, using runtime caller info to report the file and line that logged.

  • Mar 11, 2023

    Signal Handling and Graceful Shutdown in Go

    Catch SIGINT and SIGTERM in Go, broadcast the shutdown to every goroutine, unblock blocking calls and shut down an HTTP server cleanly.

  • Jul 14, 2022

    Symmetric Encryption with ChaCha20-Poly1305 in Go

    A practical guide to authenticated symmetric encryption in Go using ChaCha20-Poly1305 — keys, nonces, where to store them, and full working code.

© 2026 Riad Afridi Shibly

RSS Built with Hugo