Goodbye .csproj, Hello go.mod
Go modules and go.mod explained for .NET developers used to NuGet and csproj. No registry, no version ranges, and why...
A comprehensive guide for .NET developers making the jump to Go. From basic syntax to production deployment, this series covers everything you need to make the transition.
Whether you're curious about Go or ready to make the switch, this series takes you through the journey from a .NET developer's perspective. Each post compares familiar C# concepts with their Go equivalents, helping you build on what you already know.
New here? The posts below are listed by date. The landing page orders them as chapters, with the phrasebook first.
Go modules and go.mod explained for .NET developers used to NuGet and csproj. No registry, no version ranges, and why...
A C# to Go phrasebook. Familiar .NET concepts, keywords and operators mapped to their Go equivalents in one bookmarka...
A .NET developer's first look at the Go toolchain. go build, go run, go test and go mod compared with the dotnet CLI...
Go has no enums. How iota, typed constants and stringer stand in for C# enums, and where the substitute falls short.
Go generics compared with C# generics. Type parameters, constraints and the deliberate limits that stop you building...
Go's nil compared with C# nullable reference types. Nil pointers, nil slices, nil maps, the nil interface trap and ho...
Go has structs, not classes. How methods, constructors and encapsulation work without inheritance, for C# developers...
Go has no properties and no public or private keywords. How capitalisation controls visibility, and how to encapsulat...
Go error handling for C# developers. Why if err != nil replaces exceptions, how to wrap and inspect errors, and when...
Go's panic and recover look like exceptions but are not meant to be used like them. When they belong, and why Go deve...
Go's switch statement compared with C# switch and pattern matching. No fallthrough by default, tagless switches, type...
How Go decides between stack and heap at compile time. Escape analysis explained for C# developers used to value type...
Pointers in Go for C# developers who have never needed them. Value versus pointer receivers, when to pass by pointer,...
Go slices are not arrays and not List<T>. Length, capacity, shared backing arrays and the append gotchas that catch e...
Go channels explained for C# developers who know BlockingCollection and message passing. Buffered, unbuffered, closin...
Go's context.Context compared with C# CancellationToken. Cancellation, deadlines and request-scoped values, and why e...
Goroutines explained for C# developers who think in async/await and Task. No coloured functions, no thread affinity,...
Go's select statement for multiplexing channels. Timeouts, non-blocking operations and cancellation, compared with Ta...
Mutexes, RWMutex, WaitGroup, Once and atomic in Go's sync package, compared with lock and SemaphoreSlim in C#. When t...
Go's any type explained for C# developers. How type assertions and type switches compare to object and casting, and w...
Go has no inheritance at all. How struct embedding replaces C# class hierarchies, and why it stops being frightening...
Go interfaces are satisfied implicitly, with no implements keyword. Why that feels like chaos to C# developers and wh...
Go has benchmarking and profiling built into the toolchain. A C# developer's guide to go test -bench and pprof, compa...
Mocking in Go without Moq or NSubstitute. Hand-written fakes, small interfaces, and generated mocks with mockery and...
Multi-module Go repositories and go.work workspaces, for teams coming from .NET solutions with shared projects and ma...
How to organise a real Go project. Packages, internal directories, cmd layouts and why .NET's solution and namespace...
Testing in Go with the built-in testing package instead of xUnit or NUnit. Table-driven tests, subtests, test helpers...
Configuration in Go without IOptions or IConfiguration. Environment variables, flags, file parsing and the libraries...
Go's database/sql versus Entity Framework. Writing SQL by hand, scanning rows into structs and living without change...
Debugging Go with Delve after years of Visual Studio. What works, what is missing, and how to set up breakpoints and...
Code generation with go generate in place of C# reflection and source generators. Why Go developers write code that w...
GORM for developers who miss Entity Framework. What the most popular Go ORM offers, why the community argues about it...
Building HTTP services with Go's net/http instead of ASP.NET Core. Routing, middleware, handlers and JSON without a f...
JSON in Go with encoding/json and struct tags, compared with System.Text.Json and Newtonsoft. Omitempty, custom marsh...
gofmt, go vet and golangci-lint for developers used to .editorconfig debates. Why Go formatting is not up for discuss...
Structured logging in Go with log/slog, compared with ILogger and Serilog. Handlers, attributes, context and when to...
Shrink Go binaries with ldflags and control what gets compiled with build tags. A guide for .NET developers used to s...
Multi-stage Dockerfiles for Go that produce images under 20MB. How static binaries and scratch base images compare wi...
A complete GitHub Actions workflow for Go projects. Build, test, lint, cross-compile and release, compared with the ....
Liveness and readiness probes in Go for Kubernetes. Health check endpoints that tell orchestrators something useful,...
Running Go services on Kubernetes. Graceful shutdown, resource limits, health checks and why Go and Kubernetes fit to...
Go on AWS Lambda cold starts in around 100ms. How that compares with .NET Lambda functions, and how to build and depl...
Instrumenting a Go service with OpenTelemetry. Metrics, traces and logs wired up end to end, compared with the .NET O...
Go compiles to a single static binary with no runtime to install. Why that changes deployment for .NET developers, an...
Versioning Go modules with semantic versioning and git tags. Major version suffixes, pseudo-versions and the differen...
The C# features I actually miss after months of writing Go full time. LINQ, proper enums, nullable reference types an...
The Go features a long-time C# developer would struggle to give up. Single binaries, fast builds, implicit interfaces...
Six months of production Go after twenty years of C#. An honest retrospective on what was worth it, what hurt, and wh...
The complete C# to Go series, ordered as chapters for the first time. Who it is for, where to start, and three things...
Go 1.23 iterators and the slices and maps packages, set against LINQ. What you can write now, what still needs a loop...