Working with Go?

Go service abandoned or leaking? We take it over.

A lot of Go services we take on were written start to finish by one engineer who has since moved on, with no tests and a go.mod file that has not been touched in three years. We read the code, add the tests that should have been there, and bring the dependencies forward without breaking the deploy.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

service.log

still failing

What it is

Go at a glance

Go, sometimes called Golang, is a statically typed, compiled language that came out of Google. It was designed by Rob Pike, Robert Griesemer and Ken Thompson, first released in 2009, and reached version 1.0 in 2012.

It has a compact specification, a famously fast compiler, a garbage collector, and goroutines with channels for concurrency. Dependencies are handled by the module system, which arrived in 1.11 and became the default in 1.16.

Much of the cloud infrastructure in common use today is written in Go. Docker, Kubernetes, Terraform, Prometheus, Hugo, CockroachDB, InfluxDB, etcd and Caddy are all Go programs, and so are a large share of the CLI tools and HTTP services that run behind modern products.

Type
Compiled, statically-typed language
First released
2009
License
BSD 3-Clause
Maintained by
Google and the Go community
Typically used for
Back-end services, CLIs, infrastructure tooling, high-concurrency network servers, workers

The honest version

Go pros and cons

No technology is all upside. This is where Go earns its place and where it tends to cause trouble.

Where Go is strong

  • Builds are fastThe compiler is quick enough that you stop thinking about it, which keeps the write and test loop tight even on a large codebase.
  • One binary, deployed anywhereYou can cross-compile a Linux binary from a Mac laptop and copy it to a server. There is no runtime to install and no interpreter to match.
  • Concurrency is a first-class featureGoroutines and channels make it straightforward to run thousands of things at once, which is why so many network services are written in Go.
  • Testing is built inThe standard tool chain ships with testing, benchmarking and a race detector. You do not pick a framework before you can write your first test.
  • The standard library covers a lotHTTP servers, JSON, crypto and compression are all in the box and well maintained, so small services need very few outside dependencies.
  • gofmt ends the style argumentsThere is one official formatter and every editor runs it on save. Nobody has to review whitespace in a pull request.
  • Generics arrived in 1.18Since 2022 you can write type-parametric code without the old copy-and-paste or code-generation workarounds that earlier Go projects relied on.
  • Modules are stableThe module system settled down after a rough start and is now the clear, versioned way to pin and upgrade dependencies.

Where Go bites

  • Error handling is verboseEvery call that can fail returns an error you have to check by hand, which makes short functions longer than they would be in most other languages.
  • Generics arrived lateA lot of production Go was written before 1.18 and uses interface{} or code generation where generics would fit now. Modernising that style takes care.
  • Nil interfaces surprise peopleAn interface value can be non-nil while the thing inside it is nil, and a check that looks correct returns the wrong answer. It is a classic source of panics.
  • Concurrency is easy to leakStarting a goroutine is one keyword. Making sure it ever finishes, respects a context, and does not hold a channel forever is where the real work is.
  • No classes or inheritanceDevelopers coming from Java or C# often spend their first months fighting the type system before they settle into interfaces and composition.
  • Build tags get awkwardConditional compilation across platforms is possible but clumsy, and projects with CGO or OS-specific code often grow a thicket of tag directives.
  • Legacy dependency managers lingerOlder Go code often still sits on dep, glide or vgo instead of the modern module system, and migrating it is a careful rather than mechanical job.

Sound familiar?

Common Go problems we fix

The Go problems that bring people to us, and what you have once each one is fixed.

goroutine leak: 42,000 running

The service leaks memory and goroutines

Goroutines started on each request that never exit, usually blocked on a channel receive or an outbound call with no timeout.

Leaks found and closed

no tests in this module

You inherited a Go service with no tests

A single engineer built it, left, and now every change is a leap of faith. We read the code, add tests for the real behaviour, and get a CI run that means something.

A test suite you can trust

GOPATH mode deprecated

It is still on GOPATH or an old dep manager

A codebase stuck on GOPATH, dep or glide that will not build on a modern toolchain, and nobody has wanted to be the one to move it.

Modules, cleanly migrated

undefined: slices.Contains

The Go version is years behind

Code that targets 1.17 or earlier, pinned by a Dockerfile nobody has updated, blocking the use of generics and modern standard library helpers.

Upgraded version, green build

fatal error: concurrent map writes

It crashes under load with a race

Shared state written from multiple goroutines without a mutex or channel to coordinate them, which looks fine in testing and panics in production.

Races fixed, detector clean

context deadline exceeded

Requests hang and then time out

Downstream calls with no deadline set, or a context that never gets passed through, so slow dependencies stall the whole service.

Timeouts set, tails trimmed

checksum mismatch, go.sum invalid

The build is not reproducible

Dependencies that drift, a go.sum that has been hand-edited, or a vendored tree that no longer matches go.mod.

Reproducible builds, pinned

admin account: former employee

The original developer moved on

The only person who knew the code is gone, with no documentation and no handover. We pick it up and keep it running.

Ownership back in your team

What we do

Go help, from rescue to upkeep

Call us for one leak, or hand us the whole service.

Rescue
Panicking, leaking or refusing to build. We get it green first and find the cause second.
Takeover
Inherited Go code with no tests and no author. We read it, document it, and make it safe to change.
Modules migration
Moving from GOPATH, dep or glide to Go modules, with the toolchain brought forward at the same time.
Performance and concurrency
Goroutine leaks, race conditions, slow endpoints and memory growth, measured with the tools already in the toolchain.
Upgrades
Moving a service from an old Go version to a current one, with the deploy pipeline updated and verified.
Managed Tech
Go toolchain refreshes, module dependency audits, runtime tracing hooked up, and someone on call when a service panics in the small hours.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Go alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Go questions

Something else? Call+1 737 727 7327

Can you take over a Go service from a developer who moved on?

Yes, and it is one of the most common jobs we do with Go. We read the code, write down what it actually does, add tests for the behaviour your business depends on, and leave you with something your current team can keep working on.

Can you convert our Go code from GOPATH to Go modules?

Yes. We migrate the project to a go.mod file, pin dependencies at known-good versions, remove vendored trees that are no longer needed, and verify the build on a current Go toolchain before any of it reaches production.

Why does our Go service leak memory or goroutines?

Almost always it is goroutines that never exit, usually blocked on a channel or an outbound call with no timeout set. We capture a goroutine profile from the running service, find what is stuck, and fix the code paths that start the leak.

How do we add tests to a Go service that has none?

We start with the paths that matter most to the business, add table-driven tests around them using the standard testing package, bring in the race detector on CI, and build out from there rather than trying to cover everything at once.

Can you upgrade our Go version without breaking the deploy?

Yes. We run the upgrade against a copy first, fix anything the newer compiler is stricter about, update the Docker image and CI config together, and only then cut over the real deploy.

How much does Go help cost?

Estimates are free. Tell us what the service does and what is going wrong, and you get a price before any work starts.

Free estimate

Go service giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.