Idiomatic Go Testing: Table Driven Test
I noticed a widely praised convention in Go testing: Table Driven Tests. I thought tests should be simple, but this pattern reflects programmers' laziness.
I noticed a widely praised convention in Go testing: Table Driven Tests. I thought tests should be simple, but this pattern reflects programmers' laziness.
Notes on implementing a Set while migrating from JavaScript to Go — using maps to represent Sets since Go lacks a native Set.
Using Go 1.16's embed to include files at compile time, avoiding path/environment issues. Not suitable if files must change at runtime.
After covering what Feature Flags are, this post explains four types of Feature Flags and their differing lifecycles, dynamism, and management strategies.
I thought keeping things simple—changing code or env vars—was enough. But when incidents occur you don't have time to debug.
To better replace modules via "dependency injection" for cleaner testing. I uploaded the demo example demonstrating testing architecture through DI.
From JS to Go, I wasn't familiar with Go's approach to modularity. Although similar in places, Go's simple and opinionated design is very evident.
Revisiting serialization/deserialization in Go and the origin of "Marshal", building on my earlier post about struct tags and reflect.
High-level programming languages usually involves the concept that "unused variables are automatically garbage collected". How do programs manage memory?
Context is added to Go standard library in 1.7. It's primarily used for including deadlines, cancellation signals, and passing request-scoped values.
As more and more apps started promoting—or even requiring—two-factor authentication (2FA), I ended up installing Google Authenticator on my phone.
I always relying on convenient libraries like: dayjs for date conversion. This article aims to clarify the knowledge necessary for handling time in programming.
I found a simple explanatory video: You're Storing Passwords Wrong. Here's The Fix - LearnThatStack, so I will record knowledge related to password storage.
I realized that I don't fully understand how strings work in Go. Explored documentation to understand the history and evolution of text encoding.
When indexing position `n` in a Go string, why isn't the `n`th character returned? In Go, you get a "Rune"; direct indexing gets you a byte.