How to Use errors.Is and errors.As in Go
Go's error is a minimal interface: any type with an Error() string method counts as an error. For years the standard library gave you errors.New and fmt.Errorf, both of which…
Practical guides for developers. Ideas for building and running software.
Go's error is a minimal interface: any type with an Error() string method counts as an error. For years the standard library gave you errors.New and fmt.Errorf, both of which…
Rate limiting caps how many requests a client can send to an API within a time window; exceeding the cap…
When you build a TypeScript app that talks to an HTTP API, you almost always use fetch, the built-in function…
Go has no exceptions. When a function can fail, it returns a description of what went wrong as one of…
Go has no built-in set type, so when you need to answer "is this value already in the collection?", you…
When you secure an API, you enforce two separate rules that fail in separate ways: authentication verifies that the token…
When your frontend sends an HTTP request with fetch and the server responds with an error, fetch does not tell…
Activation is the moment a user gets real value from your product for the first time. For a developer SaaS…
Terraform creates cloud resources from declarative configuration files. When you need several similar resources, such as one IAM user per…
When you call fetch in TypeScript, the runtime sends the request and returns a Response object. The json() method returns…
An AI agent is software that uses a language model to decide its next action. The model chooses from tools…
When you create a Go map, you can pass a size hint to make: make(map[string]int, n). The hint tells the…
When you write async Rust with Tokio, tasks share state the same way threads do: with a mutex, a lock…
Your SaaS product almost certainly runs on open source code you did not write. Your customers never receive that code…
Go treats errors as values. A function that can fail returns an error as its last result, and the caller…