As a Go programmer, what design pattern, programming techniques have you actually used, implemented regularly in your workplace which made your life much easier?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • cmb

    A parser combinator library in Go

  • One of my favorite examples is parser combinators, where small functions that parse individual pieces of syntax ("parselets") can be combined in increasing sophisticated ways using function composition to be able to recognize grammars. You can make a complete recursive descent parser that way. Here's one I cooked up in Go a long time ago: https://github.com/mcvoid/cmb

  • fx

    A dependency injection based application framework for Go. (by uber-go)

  • I only have private and work repos... But I use Uber fx. https://github.com/uber-go/fx

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • go

    The Go programming language

  • There's actually been talk on and off for years now about making that a first-class feature, but there's worry about confusion with, for example, io.Writer and io.Reader's methods having the exact same signature and only being differentiated by name, something that wouldn't apply to the feature.

  • trayscale

    An unofficial GUI wrapper around the Tailscale CLI client.

  • I've actually just recently used this with both pointer and value reveivers in one of my own projects.

  • wire

    Compile-time Dependency Injection for Go

  • Im by no means a "purist" in such things, I love my magic and QoL-features/libs, but havent seen something that is so easy to use in go, that I immediately wanted to add it. And to be fair, I only looked closely at https://github.com/google/wire , others I have just skipped - and I will be looking into uber-fx as mentioned in the other comment.

  • wild-workouts-go-ddd-example

    Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.

  • Clean architecture is not tied to some specific paradigm. It's a way of thinking about programs that is common to almost every mature developer. Many developers use it without even knowing the name - they just came to it by themselves through many tries and errors. There is a good free book about using it in Go, called Go with the Domain if you interested.

  • gobyexample

    Go by Example

  • For reference I recommend Go By Example: https://gobyexample.com/

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts