Skip to content

Instantly share code, notes, and snippets.

@eduardrudko
Last active May 23, 2022 17:37
Show Gist options
  • Save eduardrudko/c4d6afdfd86904d7c198f1a080cc5757 to your computer and use it in GitHub Desktop.
Save eduardrudko/c4d6afdfd86904d7c198f1a080cc5757 to your computer and use it in GitHub Desktop.
Go libs
https://onsi.github.io/ginkgo/ and its companion libraries provide a pretty good toolkit for all types of tests (also check out https://onsi.github.io/gomega/ and https://agouti.org)
https://cobra.dev helps building CLIs and ingesting configuration
https://github.com/antonmedv/expr Nice little expression evaluation library for Go. Also type-safe
https://github.com/mtrense/soil Nice DSL on top of Cobra+Viper. Also some defaults for high-performance logging
https://github.com/rs/zerolog high-performance logging library
https://github.com/markbates/goth Authentication library in the spirit of Omniauth
https://www.iris-go.com well-documented and -maintained web library
https://github.com/jltorresm/otpgo OTP generation for go
https://github.com/pterm/pterm Pretty printers for the terminal
https://github.com/jedib0t/go-pretty Another pretty printer
https://github.com/vbauerster/mpb Progress bars on the terminal
https://github.com/c-bata/go-prompt Nice library for managing prompts
https://github.com/emirpasic/gods Data structures for go (generics support is on the way)
https://github.com/daichi-m/go18ds Same as above but already includes generics
https://github.com/twharmon/slices Some operations on slices (generic)
https://github.com/gammazero/deque Ringbuffer/Queue/Stack implementation
https://github.com/blevesearch/bleve Indexing library for search engines
https://github.com/dgraph-io/badger KV-Store that backs https://github.com/dgraph-io/dgraph
https://github.com/golang-migrate/migrate schema management forRDBMs
https://github.com/xo/xo Query generation for RDBMs
https://github.com/jackc/pgx Better Postgres driver
https://github.com/jmoiron/sqlx Nicer interface to SQL DBs
https://github.com/luraproject/lura Nice API gateway
https://github.com/mailhog/MailHog Fake Mail server
https://github.com/glycerine/zygomys Lisp engine for Go (with some syntactic sugar added)
https://github.com/GeertJohan/go.rice embed arbitrary files into go binaries
https://pkg.go.dev/embed embedding of binaries but using go directives and a bit less flexible
https://github.com/repeale/fp-go Some nice functional programming helpers
https://github.com/TeaEntityLab/fpGo And more fp goodies
https://github.com/nfnt/resize Image resizing
https://github.com/noelyahan/mergi Image resizing and more image manipulation
https://github.com/itchyny/gojq jq implementation in Go (as usual with Go, also easily usable as a library :slightly_smiling_face:)
https://gitlab.com/tymonx/go-formatter Inline formatting in Strings
https://github.com/huandu/xstrings Few additional string manipulation functions
https://github.com/pascaldekloe/metrics Nice little library for publishing metrics to Prometheus
https://github.com/pioz/faker Library for generating fake data
https://github.com/teris-io/shortid Short ID generation
https://github.com/go-resty/resty HTTP Client Lib
https://github.com/ugorji/go Different serialization formats, with code generation
https://github.com/osteele/liquid Liquid templates (port from ruby)
There’s really a ton more libraries and tools on sites like https://awesome-go.com and https://github.com/golang/go/wiki/Projects. One thing to look out for in libraries is whether they need CGO (prefer those which don’t, as this makes cross-compiling much easier and removes one common pitfall).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment