About 99 results
https://rednafi.com/go/avoid-context-key-collisions/ · 22 Oct 2025
Master Go context keys with custom types, avoid collisions using empty structs, and learn accessor patterns for safe request-scoped values.
https://rednafi.com/go/organizing-tests/ · 8 Oct 2025
Organize Go tests with in-package, external _test packages, and integration tests. Learn white-box vs black-box testing conventions.
https://rednafi.com/go/subtest-grouping/ · 1 Oct 2025
Organize Go subtests with t.Run nesting and parallel execution. Learn patterns for setup, teardown, and readable test hierarchies.
https://rednafi.com/go/app-structure/ · 20 Sep 2025
Organize Go apps by domain, not technology. Learn why models/controllers structure hurts and how bounded contexts create better separation.
https://rednafi.com/go/test-state-not-interactions/ · 14 Sep 2025
Avoid brittle AI-generated tests that check implementation details. Write maintainable tests that verify behavior, not method calls.
https://rednafi.com/go/early-return-and-goroutine-leak/ · 7 Sep 2025
Prevent goroutine leaks caused by early returns with unbuffered channels. Learn buffering, draining, errgroup patterns, and goleak testing.
https://rednafi.com/go/lifecycle-management-in-tests/ · 30 Aug 2025
Master Go test lifecycle with t.Cleanup(), subtests, and TestMain. Learn per-test, grouped, and package-wide setup patterns effectively.
https://rednafi.com/go/gateway-pattern/ · 3 Aug 2025
Separate business logic from external service calls using the Gateway pattern. Apply dependency inversion and interface segregation in Go.
https://blog.nove-b.dev/posts/write-terminal-by-go · 5 Jul 2025
個人開発するものがないと【2025年6月】今年も半分終わったらしいで書いたけど、さっそく作りたいものができたので着手することにした。 作りたいのはCLIツールでnpx xxxxというコマンドで...
https://rednafi.com/go/test-config-with-flags/ · 28 Jun 2025
Control Go test behavior with custom flags instead of build tags or env vars. Enable integration and snapshot tests with discoverable CLI options.