Skip to main content

Go Language

We use Go (Golang) in a variety of services in OPG Digital and it is typically our first choice for new development due to its efficiency and strong type safety.

We do not have any preferred frameworks for Go applications: instead we mostly rely on the standard library wherever possible to reduce our dependency graph and keep code simple and consistent.

Example OPG Go repositories

We have many services built with Go, but here are a few repositories that provide a good range of examples of our usage.

All OPG repos using Go

Standard tools

We often use these libraries in our Go applications:

  • golangci-lint - Go linter that bundles multiple other linting tools
  • testify - Unit testing toolkit providing mock and assertion functions
  • mockery - Generates mocks for testing
  • air - CLI package that automatically rebuilds and reloads Go apps with local changes
  • delve - Debugger for Go applications
  • validator - Struct and field validation for Go applications
  • sqlc - Generates type-safe Go code from SQL queries
  • goose - Database migration tool for Go applications

UI

Our Go applications typically use Go templates for rendering HTML, with small JS scripts for interactivity. For conditional rendering of the DOM, we have had success with HTMX (see finance-hub for examples).

Learning Resources

These are resources we’ve found useful in OPG for learning and mastering Go.

Video Courses

Ask your line manager about a Pluralsight license.

This page was last reviewed on 26 June 2026. It needs to be reviewed again on 26 June 2027 by the page owner #opg-developers .
This page was set to be reviewed before 26 June 2027 by the page owner #opg-developers. This might mean the content is out of date.