Go Tutorial #25: Building a Microservice — Complete Project

In the previous tutorial, you learned Docker for Go. Now let’s put everything together and build a complete microservice. This is a project tutorial. You will build a notes API from scratch using the skills from the entire series: Gin for routing, PostgreSQL with sqlx for storage, JWT for authentication, validation for input, slog for logging, and Docker for deployment. What We Are Building A notes microservice with these endpoints: Method Path Description Auth POST /api/register Create account No POST /api/login Get JWT token No GET /api/notes List user’s notes Yes POST /api/notes Create a note Yes GET /api/notes/:id Get a note Yes PUT /api/notes/:id Update a note Yes DELETE /api/notes/:id Delete a note Yes GET /health Health check No Project Structure notes-api/ cmd/ server/ main.go # Entry point internal/ handler/ auth.go # Auth handlers (register, login) notes.go # Note CRUD handlers middleware.go # JWT middleware model/ user.go # User struct note.go # Note struct repository/ user.go # User database operations note.go # Note database operations service/ auth.go # Auth business logic go.mod go.sum Dockerfile docker-compose.yml This follows the clean architecture from Go Tutorial #10. ...

April 14, 2026 · 12 min

Go Tutorial #24: Docker for Go — Building Production Images

In the previous tutorial, you built a CLI tool with Cobra. Now let’s package your Go applications with Docker. Go and Docker are a perfect combination. Go compiles to a single static binary. No runtime, no dependencies, no virtual machine. You can run a Go binary in a Docker image that contains nothing else. The result? Production images under 15MB. A Simple Dockerfile Start with a basic Dockerfile for a Go web server: ...

April 13, 2026 · 7 min

Go Tutorial #23: Building CLI Tools with Cobra

In the previous tutorial, you learned about generics. Now let’s build something practical — a command-line tool. Go is one of the best languages for building CLI tools. It compiles to a single binary with no dependencies. Tools like Docker, kubectl, Hugo, and GitHub CLI are all written in Go using Cobra. In this tutorial, you will build a complete TODO CLI app. What is Cobra? Cobra is a library for creating CLI applications in Go. It provides: ...

April 13, 2026 · 9 min

Claude AI Tutorial #7: Messages API Deep Dive — Roles, Streaming, Multi-Turn

The Messages API is the foundation of everything you build with Claude. Every feature — tool use, vision, streaming, caching — goes through this API. Understanding it deeply will make every other article in this series easier. This is Article 7 in the Claude AI — From Zero to Power User series. You should have completed Article 2: Getting Started before this article. By the end of this article, you will know how to build multi-turn conversations, stream responses in real time, and track your token usage. ...

April 13, 2026 · 10 min

Go Tutorial #22: Generics — Type Parameters in Go

In the previous tutorial, you learned API best practices. Now let’s explore one of Go’s most powerful features — generics. Before Go 1.18, you had two choices for writing reusable code: use interface{} (losing type safety) or write the same function for every type. Generics solve this problem. You write a function once, and it works with any type that meets your constraints. The Problem Without Generics Imagine you need a function to find the minimum value in a slice. Without generics, you write one function per type: ...

April 13, 2026 · 9 min

Go Tutorial #21: Input Validation and API Best Practices

In the previous tutorial, you learned how to read and write files in Go. Now let’s focus on making your APIs production-ready. Building an API that works is one thing. Building an API that is reliable, secure, and easy to use is another. In this tutorial, you will learn the best practices that separate hobby projects from production services. Input Validation with validator Manual validation gets messy fast. The go-playground/validator package lets you validate structs with tags: ...

April 13, 2026 · 8 min

Go Tutorial #20: File I/O — Reading and Writing Files

In the previous tutorial, you learned database access with sqlx. Now let us work with files. File I/O is one of the most common tasks in Go — reading configuration files, processing logs, exporting data, and more. Go makes file I/O simple with the os and bufio packages. And the io.Reader and io.Writer interfaces make everything composable. Reading an Entire File The simplest way to read a file is os.ReadFile: package main import ( "fmt" "log" "os" ) func main() { data, err := os.ReadFile("hello.txt") if err != nil { log.Fatal(err) } fmt.Println(string(data)) } os.ReadFile reads the entire file into memory as a byte slice. This is fine for small files. For large files, use a scanner or reader instead. ...

April 12, 2026 · 8 min

Claude Mythos: The AI Too Dangerous to Release

Anthropic just built its most powerful model — and decided not to release it to the public. Claude Mythos Preview is real, and the reason it’s restricted has nothing to do with business strategy. It found thousands of zero-day vulnerabilities across every major operating system and every major web browser. Some of those bugs had been hiding for decades. What Is Claude Mythos Preview? Claude Mythos Preview is Anthropic’s most capable model, released April 7, 2026 — but only to a restricted set of security partners. ...

April 12, 2026 · 4 min

Go Tutorial #19: Database Access with sqlx

In the previous tutorial, you built JWT authentication for your API. But we stored users in memory — they disappear when the server restarts. It is time to use a real database. Go has a clean database interface in the standard library. And sqlx makes it even better by adding struct scanning and named queries. In this tutorial, you will learn how to use sqlx with PostgreSQL. database/sql — The Standard Interface Go’s database/sql package defines a standard interface for SQL databases. It works with any SQL database through drivers: ...

April 12, 2026 · 10 min

Claude AI Tutorial #6: CLAUDE.md — Project Instructions That Make Claude Smarter

Claude Code is smart. But it does not know your project. It does not know your coding style, your build commands, or your project structure. That is what CLAUDE.md fixes. This is Article 6 in the Claude AI — From Zero to Power User series. You should have completed Article 3: Claude Code CLI before this article. By the end of this article, you will know how to write CLAUDE.md files that make Claude Code work like a teammate who already knows your codebase. ...

April 12, 2026 · 9 min