If you could go back in time | What would you do different regarding go

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
  • golang-standards/project-layout

    Standard Go Project Layout

  • When I started learning golang almost 9 years ago I've learned myself to structure it like a Laravel framework. The main api is also build in that fashion and to big to split it up or rebuild it.. Which bit me in the ass quite a few times. I recently switched job and am unlearning the MVC setup and trying to build it more like described here : https://github.com/golang-standards/project-layout

  • service

    Starter-kit for writing services in Go using Kubernetes. (by ardanlabs)

  • So what can you do insted? For testing databases, setup a docker instance for tests (e.g. like in https://github.com/ardanlabs/service), or start an embedded-postgres daemon (see https://github.com/fergusstrange/embedded-postgres). For communication with external APIs, just pass the http.Client (either in context.Context or as a field on the struct). Then in tests, you can override the http.Client.Transport func.

  • 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
  • embedded-postgres

    Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test

  • So what can you do insted? For testing databases, setup a docker instance for tests (e.g. like in https://github.com/ardanlabs/service), or start an embedded-postgres daemon (see https://github.com/fergusstrange/embedded-postgres). For communication with external APIs, just pass the http.Client (either in context.Context or as a field on the struct). Then in tests, you can override the http.Client.Transport func.

  • go-training

    Go Training Repositories regroups some useful resources to learn Go Programming Language

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