-
https://github.com/derision-test/go-mockgen for the best mocks Ive ever had in Go https://github.com/go-chi/chi for HTTP routing
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
logrus for logging. It's slower than zerolog but I've been used it for so long, so if performance doesn't really matter (e.g. simple CLI) I still prefer to use it.
-
logrus and, more recently, zerolog for logging
-
go-spew : Really helpful to pretty print user defined data structures, makes debugging a lot easier.
-
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.
This has been fixed in Gin v1.7.2.
-
Here is link number 1 - Previous text "PGX"
-
go-json for encoding/decoding
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
-
pggen
Generate type-safe Go for any Postgres query. If Postgres can run the query, pggen can generate code for it.
Agree with your choices, except go-json which I never tried. pggen is fantastic. Love that library. The underlying driver, pgx, is also really well written.
-
https://github.com/derision-test/go-mockgen for the best mocks Ive ever had in Go https://github.com/go-chi/chi for HTTP routing
-
https://github.com/keegancsmith/sqlf for building parameterized SQL queries
-
https://github.com/AsynkronIT/protoactor-go for actor model framework (situational)
-
I love https://github.com/tidwall/gjson and https://github.com/tidwall/sjson for fast and frictionless json reading and editing. It makes life so much easier for cases where you don't want to model a tree of nightmare-ish API responses, like Elasticsearch.
-
I love https://github.com/tidwall/gjson and https://github.com/tidwall/sjson for fast and frictionless json reading and editing. It makes life so much easier for cases where you don't want to model a tree of nightmare-ish API responses, like Elasticsearch.
-
go-sdk
Discontinued A composable toolbox of libraries to build everything from CLIs to enterprise applications. (by blend)
This is probably not popular approach on here, but we maintain a public version of our internal go monorepo sdk package as an open source repo on github: https://github.com/blend/go-sdk, and I'll use this for personal stuff as well.
-
https://github.com/pkg/errors is a must-have prior to the Go2 error proposals landing.
-
https://github.com/joho/godotenv for loading env vars from a file gets used a lot here.
-
httprouter for routing. Several years ago (5 years ago maybe) when I started using Go, I always tried to use the best and fastest packages and this package boasts itself as the fastest router for Go. Fast forward to today, I'm not sure if it still the fastest around, but it's stable and I've never had issues with it, so I keep using it.
-
testify for testing. I like it since it make the testing codes shorter and tidy.
-
cobra for CLI. It's easy to use and I've been using it for so long I don't have any plan to change it.
-
sqlx which make working with database painless. It's really vital for my job since as an ordinary developer my jobs often revolved on creating CRUD apps. It also uses SQL query, so I don't have to learn any ORMs.
-
decimal, one of the first Go library that created to work with decimal and monetary value.
-
qamel, simple QML binding for Go. Before pandemic I often use it for creating simple GUI apps for my clients or friends. It's features are limited, only works for Windows and Linux (though there is PR for ARM devices which I haven't able to check) but it's good enough for my case.
-
dom, package for manipulating HTML document with APIs that kinda similar with DOM manipulation in JS. I use it whenever I need to scrape data from websites.
-
dbgen, a simple package for generating database codes for MySQL and MariaDB. As I said before, my job mostly on CRUDs and it's quite a pain to write database codes in Go using sqlx as its base. For each database operation I need to do at least three operations:
-
koanf
Simple, extremely lightweight, extensible, configuration management library for Go. Supports JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
https://github.com/knadh/koanf for config management. Readme contains why it's a good alternative to viper.
-
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
kin-openapi
OpenAPI 3.0 (and Swagger v2) implementation for Go (parsing, converting, validation, and more)
oklog/ulid to generate IDs. coreos/go-oidc for validating JWTs I get from auth. google/go-cmp for comparing structs in tests (unless the project is already using Testify). spf13/pflag because life's too short for Go's flag handling. getkin/kin-openapi for validating reqests/responses against my OpenAPI spec (in tests).
-
Are there people seek a fixture replacement package like factory_bot (a ruby gem)? I build a similar package (gogo-factory). It is helpful to setup test data.
-
For my simple case i just wrote the migrations as queries in my test code. But I'm pretty sure you could use go-migrate for that
-
Swag Swagger doc generator
-
Zap Levelled logging
-
Ginkgo Behavioural test framework
-
jsoniter
A high-performance 100% compatible drop-in replacement of "encoding/json" (by json-iterator)
jsoniter for low level access to JSON encode and decode
-
Go Task A simple task runner which is cleaner IMHO than using Makefiles (opinionated but works for me)
-
Goreman A handy little process runner I find useful for various things
-
Direnv Very useful for maintaining environments per directory
-
Athens A self hosted Go module proxy which has saved our asses more than once.
-
bqb
BQB is a lightweight and easy to use query builder that works with sqlite, mysql, mariadb, postgres, and others.
bqb for query building. Used to use squirrel, but performance and complexity lead me to make bqb.
-
gqlgen for GraphQL services. After trying several packages, gqlgen has been the most stable and easy to use.
-
gopherjs has been great with a personal experiment to implement a virtual dom framework within Go.
-
Also recommend the Awesome Go list.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives