What are the most useful packages you know for Go?

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

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

    lightweight, idiomatic and composable router for building Go HTTP services

  • https://github.com/go-chi/chi - when net/http is not enough this is the router I use. gorilla/mux is slow, didn't bother trying anything else after chi.

  • go-formatter

    A curated list of awesome Go frameworks, libraries and software

  • It depends on what you would like to do with Go, but good starting points could be https://awesomeopensource.com/projects/go and may have a look at https://github.com/avelino/awesome-go .

  • 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
  • zerolog

    Zero Allocation JSON Logger

  • https://github.com/rs/zerolog - one of the best structural logging library

  • websocket

    Minimal and idiomatic WebSocket library for Go (by nhooyr)

  • https://github.com/nhooyr/websocket - websocket implementation. Recently migrated to it from gorilla/websocket. Nicer API and faster but nothing really wrong with gorilla. Just wanted to try something new.

  • pgx

    PostgreSQL driver and toolkit for Go

  • https://github.com/jackc/pgx - excellent library for Postgre. Especially if you need PSQL specific features

  • goqu

    SQL builder and query library for golang

  • github.com/doug-martin/goqu - SQL query builder. Don't like ORMs in general, didn't like GORM. The API is a bit verbose but it does the job and supports tons of SQL features including database specific ones.

  • errors

    Discontinued Simple error handling primitives

  • github.com/pkg/errors - don't like how wrapping is done in standard library. This is better. Been using this library forever and it's even compatible with recent standard library changes.

  • 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
  • Testify

    A toolkit with common assertions and mocks that plays nicely with the standard library

  • github.com/stretchr/testify - very useful for tests

  • Gin

    Gin is a HTTP web framework written in Go (Golang). It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.

  • https://github.com/gin-gonic/gin - My goto framework for writing microservices

  • gomock

    Discontinued GoMock is a mocking framework for the Go programming language. (by golang)

  • https://github.com/golang/mock - Auto generate mocks from interfaces for unit testing

  • gonum

    Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more

  • https://github.com/gonum/gonum - Contains almost everything one needs for numerical analysis. The guys over there are porting LAPACK to pure Go with explicit tests.

  • requests

    HTTP requests for Gophers (by earthboundkid)

  • sqlx

    general purpose extensions to golang's database/sql

  • https://github.com/jmoiron/sqlx : Great extension of the standard database/sql package, but 100% compatible with it

  • multierrgroup

  • Because I like hashicorp's multierror, I created https://github.com/andrewstuart/multierrgroup which basically provides the same API but returns all errors encountered, if any.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub 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