Tutorial: a tiny JSON HTTP service in Go 1.26 using new(expression)
Step by step: install Go 1.26, write a 35-line HTTP service that returns JSON with an optional field set via new(21.5), run it, verify the output, and fix common errors.
Tag
1 article tagged golang.
Blog
Cloud
Go context cancellation from zero: build a 50-line server that stops a slow job when the client hangs up or a deadline passes, read the reason with context.Cause, and pass ctx down to your database and outbound calls.
Cloud
Go context cancellation from zero: build a 50-line server that stops a slow job when the client hangs up or a deadline passes, read the reason with context.Cause, and pass ctx down to your database and outbound calls.
Cloud
Go 1.27 lets a method declare its own type parameters, so Map can live on your type instead of floating in the package. A 40-line lab, how inference works, and the interface rule that still holds.