This repository holds the Uber Go Style Guide, which documents patterns and conventions used in Go code at Uber. Styles are the conventions that govern our code. The term style is a bit of a misnomer, since these conventions cover far more than just source file formatting—gofmt handles that for us. The goal of this guide is to manage this complexity by describing in detail the Dos and Don'ts of writing Go code at Uber. These rules exist to keep the code base manageable while still allowing engineers to use Go language features productively. This guide was originally created by Prashant Varanasi and Simon Newton as a way to bring some colleagues up to speed with using Go. Over the years it has been amended based on feedback from others. This documents idiomatic conventions in Go code that we follow at Uber. A lot of these are general guidelines for Go, while others extend upon external resources.

Features

  • Pointers to Interfaces
  • Verify Interface Compliance
  • Receivers and Interfaces
  • Zero-value Mutexes are Valid
  • Copy Slices and Maps at Boundaries
  • Channel Size is One or None
  • Handle Type Assertion Failures

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Uber Go Style Guide

Uber Go Style Guide Web Site

Other Useful Business Software
Stay in Flow. Let Zenflow Handle the Heavy Lifting. Icon
Stay in Flow. Let Zenflow Handle the Heavy Lifting.

Your AI engineering control center. Zenflow turns specs into shipped features using parallel agents and multi-repo intelligence.

Zenflow is your engineering control center, turning specs into shipped features. Parallel agents handle coding, testing, and refactoring with real repo context. Multi-agent workflows remove bottlenecks and automate routine work so developers stay focused and in flow.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Uber Go Style Guide!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Libraries

Registered

2023-01-03