#Golang
63 articles
Introducing gogocoin — A Self-Hosted Crypto Trading Bot
A deep dive into gogocoin, a Go-based self-hosted Bitcoin trading bot for bitFlyer. Covers the pluggable strategy architecture, layered design and dependency rules, trading flow, data model, and balance cache.
Introducing gohan — A Go Static Site Generator with Incremental Builds
A deep dive into gohan, a Go-based static site generator powering bmf-tech.com. Features SHA-256 manifest-driven incremental builds, i18n, Mermaid diagrams, OGP image generation, and a compiled plugin system (Amazon book cards, bookshelf page).
Migrating bmf-tech.com from gobel to gohan — A Full Static Site Transition
The complete process of migrating bmf-tech.com from a self-built headless CMS (gobel) with MySQL and Vue.js to a fully static site on gohan, hosted on Cloudflare Pages. Covers 700+ articles, English slug generation, image migration, redirects, and a Go-based preflight checker.
The Go Programming Language, 2nd Edition: An Idiomatic Go Practical Guide for Programmers from Other Languages
The Go Programming Language, 2nd Edition: An Idiomatic Go Practical Guide for Programmers from Other Languages
Delegation Over Inheritance
Learn duck typing and Liskov Substitution Principle. Build resilient Go applications using delegation patterns over inheritance.
Why Interfaces Change Less Frequently Than Implementations
Understand why Go interfaces change less frequently than implementations, stabilizing contracts while allowing implementation flexibility.
Why the Singleton Pattern is an Anti-Pattern
Examine why the Singleton pattern creates architectural problems and dependency injection provides superior design alternatives.
Understanding Terminal Specifications for TUI Development
Explore terminal specifications, raw mode, ANSI escape sequences, and termios for TUI development with practical Go implementations.
Test Doubles Explained: Mocks, Stubs, Fakes, and Spies
Learn the differences between test doubles: mocks, stubs, fakes, dummies, and spies. Understand when to use each type and how they improve unit test isolation and clarity.
Exploring Processes, Goroutines, and Memory in Go
Explore Go virtual address spaces, process isolation, goroutine memory sharing, stack and heap behavior.
Introducing ggc — A Go-Based Git Tool
A complete walkthrough of ggc: the CLI/interactive split architecture, fuzzy-search engine implementation, Workflow Mode internals, customisable aliases, and cross-platform keybinding profiles.
Go's Concurrency and Parallelism Model and Goroutine Scheduling
Understand Go concurrency vs. parallelism. Covers goroutine scheduling, GOMAXPROCS, the GMP model, OS threads vs. goroutines, and how preemption works with sequence diagram examples.
Building & Pushing Docker Images with GoReleaser
Automate Docker image builds across multiple platforms using GoReleaser with GitHub Actions for streamlined CI/CD deployment.
From Custom HTTP Router to New ServeMux
Migrate from a custom HTTP router goblin to Go 1.22 enhanced net/http ServeMux. Covers new routing patterns, performance comparison with third-party routers, and when ServeMux is enough.
About Go's rune Type
Learn what Go rune type is and how it represents Unicode code points (int32 alias). Covers string vs. rune differences, range loop behavior, and multi-byte character handling.
One-Liner for Self-Signed Certificates in Go
Generate a self-signed TLS certificate in Go with one command using the built-in generate_cert.go tool. Produces cert.pem and key.pem for local HTTPS without openssl or mkcert.
Changes to ServeMux Specification in Go 1.22rc
Explore Go 1.22 enhanced ServeMux routing: HTTP method patterns (GET /items), wildcard path params (/items/{id}), the /{$} exact-match wildcard, and Request.PathValue.
Using Workspace Mode with Go's Multi-Module Structure
Learn how Go Workspace mode (Go 1.18+) simplifies multi-module development. Covers go work init, go.work file structure, and referencing local modules without editing go.mod.
Distributing Go Applications with GoReleaser
Using GoReleaser to cross-compile and distribute Go application binaries.
Side Effects of Go's response.WriteHeader
Learn why calling Go response.WriteHeader multiple times triggers the superfluous call warning. Covers how the first status code wins and how to fix duplicate WriteHeader in HTTP handlers.