Attribute Routing Comes to Go's ServeMux, in Struct Tags
Go's method and wildcard patterns set against [HttpGet("{id:int}")]. What the standard mux matches, what it leaves to you, and mapget, a small library that a...
Go's method and wildcard patterns set against [HttpGet("{id:int}")]. What the standard mux matches, what it leaves to you, and mapget, a small library that a...
The same small app, a sherry bar's chalk tab with an API and a CLI, written twice in one repository so the two layouts can be compared folder by folder: proj...
Two years on, five claims in the C# to Go series that the toolchain has overtaken: GOMAXPROCS in containers, the image pins, the golangci-lint config, b.N lo...
The C# client on the hot path was written the way the templates say and sat at 7.1 ms against Go's 4.4. This one throws out HttpClient, JsonNode and Console,...
Go 1.23 iterators and the slices and maps packages, set against LINQ. What you can write now, what still needs a loop, and what Go 1.27 generic methods change.
The third client on the hot path: HttpClient, System.Text.Json nodes and a StreamReader loop, published with Native AOT on .NET 10. The binary is smaller tha...
The complete C# to Go series, ordered as chapters for the first time. Who it is for, where to start, and three things I would write differently now that Go i...
Streaming LLM responses end to end: Server-Sent Events, a chunk protocol for tool calls, a React Native transport and a renderer that upgrades to rich content.
Six months of production Go after twenty years of C#. An honest retrospective on what was worth it, what hurt, and what I would tell past me.
The Go features a long-time C# developer would struggle to give up. Single binaries, fast builds, implicit interfaces and the rest.
The C# features I actually miss after months of writing Go full time. LINQ, proper enums, nullable reference types and a few others.
Go on AWS Lambda cold starts in around 100ms. How that compares with .NET Lambda functions, and how to build and deploy a Go handler.
Multi-stage Dockerfiles for Go that produce images under 20MB. How static binaries and scratch base images compare with .NET container builds.
A complete GitHub Actions workflow for Go projects. Build, test, lint, cross-compile and release, compared with the .NET CI setup you already know.
Liveness and readiness probes in Go for Kubernetes. Health check endpoints that tell orchestrators something useful, compared with ASP.NET Core health checks.
Running Go services on Kubernetes. Graceful shutdown, resource limits, health checks and why Go and Kubernetes fit together so naturally.
Instrumenting a Go service with OpenTelemetry. Metrics, traces and logs wired up end to end, compared with the .NET OpenTelemetry setup.
Shrink Go binaries with ldflags and control what gets compiled with build tags. A guide for .NET developers used to self-contained deployments.
Go compiles to a single static binary with no runtime to install. Why that changes deployment for .NET developers, and how cross-compilation works.
Versioning Go modules with semantic versioning and git tags. Major version suffixes, pseudo-versions and the differences from NuGet packaging.
Configuration in Go without IOptions or IConfiguration. Environment variables, flags, file parsing and the libraries .NET developers reach for.
Go's database/sql versus Entity Framework. Writing SQL by hand, scanning rows into structs and living without change tracking or LINQ.
Debugging Go with Delve after years of Visual Studio. What works, what is missing, and how to set up breakpoints and watches in VS Code and GoLand.
Code generation with go generate in place of C# reflection and source generators. Why Go developers write code that writes code, and the tools they use.
GORM for developers who miss Entity Framework. What the most popular Go ORM offers, why the community argues about it, and the alternatives like sqlc.
Building HTTP services with Go's net/http instead of ASP.NET Core. Routing, middleware, handlers and JSON without a framework.
JSON in Go with encoding/json and struct tags, compared with System.Text.Json and Newtonsoft. Omitempty, custom marshalling and the quirks that bite.
gofmt, go vet and golangci-lint for developers used to .editorconfig debates. Why Go formatting is not up for discussion, and the linters worth enabling.
Structured logging in Go with log/slog, compared with ILogger and Serilog. Handlers, attributes, context and when to still pick zerolog or zap.
Go has benchmarking and profiling built into the toolchain. A C# developer's guide to go test -bench and pprof, compared with BenchmarkDotNet.
Mocking in Go without Moq or NSubstitute. Hand-written fakes, small interfaces, and generated mocks with mockery and gomock.
Multi-module Go repositories and go.work workspaces, for teams coming from .NET solutions with shared projects and many services.
How to organise a real Go project. Packages, internal directories, cmd layouts and why .NET's solution and namespace hierarchy does not translate.
Testing in Go with the built-in testing package instead of xUnit or NUnit. Table-driven tests, subtests, test helpers and coverage.
Go has no inheritance at all. How struct embedding replaces C# class hierarchies, and why it stops being frightening after the first week.
Go interfaces are satisfied implicitly, with no implements keyword. Why that feels like chaos to C# developers and why it turns out to be better.
Go's any type explained for C# developers. How type assertions and type switches compare to object and casting, and when reaching for any is a mistake.
Goroutines explained for C# developers who think in async/await and Task. No coloured functions, no thread affinity, and a different mental model.
Go channels explained for C# developers who know BlockingCollection and message passing. Buffered, unbuffered, closing, ranging and the classic gotchas.
Go's context.Context compared with C# CancellationToken. Cancellation, deadlines and request-scoped values, and why every I/O function takes one.
Mutexes, RWMutex, WaitGroup, Once and atomic in Go's sync package, compared with lock and SemaphoreSlim in C#. When to use them instead of channels.
Go's select statement for multiplexing channels. Timeouts, non-blocking operations and cancellation, compared with Task.WhenAny in C#.
Pointers in Go for C# developers who have never needed them. Value versus pointer receivers, when to pass by pointer, and why it is less scary than it sounds.
Go slices are not arrays and not List<T>. Length, capacity, shared backing arrays and the append gotchas that catch every C# developer.
How Go decides between stack and heap at compile time. Escape analysis explained for C# developers used to value types and the garbage collector.
Go error handling for C# developers. Why if err != nil replaces exceptions, how to wrap and inspect errors, and when the verbosity pays off.
Go's panic and recover look like exceptions but are not meant to be used like them. When they belong, and why Go developers judge you for throwing.
Go's switch statement compared with C# switch and pattern matching. No fallthrough by default, tagless switches, type switches and the surprises.
Go generics compared with C# generics. Type parameters, constraints and the deliberate limits that stop you building your usual abstractions.
Go has no enums. How iota, typed constants and stringer stand in for C# enums, and where the substitute falls short.
Go's nil compared with C# nullable reference types. Nil pointers, nil slices, nil maps, the nil interface trap and how to stay safe without the compiler's help.
Go has no properties and no public or private keywords. How capitalisation controls visibility, and how to encapsulate without getters and setters.
Go has structs, not classes. How methods, constructors and encapsulation work without inheritance, for C# developers who design class hierarchies.
Go modules and go.mod explained for .NET developers used to NuGet and csproj. No registry, no version ranges, and why it works anyway.
A C# to Go phrasebook. Familiar .NET concepts, keywords and operators mapped to their Go equivalents in one bookmarkable reference.
A .NET developer's first look at the Go toolchain. go build, go run, go test and go mod compared with the dotnet CLI and MSBuild.