Go libraries

CLI

  • ProtoActor-Go - In beta for Go but.. Ultra fast distributed actors for Go, C# and Java/Kotlin

  • Flaggy - Idiomatic Go input parsing with subcommands, positional values, and flags at any position.

  • cli - Simple, fast, and fun package for building command line apps in Go.

  • gjson - Get JSON values quickly - JSON parser for Go.

  • ishell - Library for creating interactive cli applications.

  • progressbar - Basic thread-safe progressbar for Go apps.

  • flagga - Extensible Go library for handling program configuration using flags.

  • ff - Flags-first package for configuration.

  • go-sh - Like python-sh, for easy call shell with golang.

  • Docli - Declarative language for describing command-line interfaces.

  • uilive - Go library for updating terminal output in realtime.

  • gowid - Compositional widgets for terminal user interfaces, written in Go, inspired by urwid.

  • go-arg - Structured argument parsing for Go.

  • Glamour - Write gorgeous command-line tools.

  • termenv - Advanced ANSI style & color support for your terminal applications.

  • tui go - UI lib for terminal applications.

  • Survey - Library for building interactive prompts.

  • GOCUI - Minimalist Go package aimed at creating Console User Interfaces.

  • mitchellh/cli - Go library for implementing command-line interfaces.

  • Spinner - Simple package to add a spinner / progress indicator to any terminal application.

Test

  • go-cmp - Package for equality of Go values.

  • check - Rich testing for the Go language.

  • go-mutetesting - Mutation testing for Go source code.

  • gotest - Go test with colors.

  • Filet - Small temporary file utility for Go testing.

  • quicktest - Collection of Go helpers for writing tests.

  • go-fuzz - Randomized testing for Go.

  • Mockc - Compile-time mock generator for Go.

  • Terratest - Makes it easier to write automated tests for your infrastructure code.

Web

  • Gin - HTTP web framework. Features a Martini-like API with much better performance.

  • Chi - Lightweight, idiomatic and composable router for building Go HTTP services.

  • fasthttp - Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http.

  • Macaron - High productive and modular web framework in Go.

  • Echo - High performance, minimalist Go web framework.

  • Gramework - Fast and Reliable Golang Web Framework.

  • Vugu - Modern UI library for Go+WebAssembly (experimental).

  • Coco - Golang WebAssembly Framework.

  • Wasmer - Go library to run WebAssembly binaries at native speed.

  • Vecty - Library for building responsive and dynamic web frontends in Go instead of in JavaScript, HTML & CSS.

  • Heimdall - Enhanced HTTP client for Go.

  • mux - Powerful HTTP router and URL matcher for building Go web servers with.

  • go-httpwares - Go HTTP Server Middleware and Client Tripperware.

  • Gorsk - Idiomatic Golang Restful Starter Kit.

  • Fiber - Expressjs inspired web framework build on Fasthttp.

  • REST Layer - API framework heavily inspired by the excellent Python Eve.

  • Manners - Polite Go HTTP server that shuts down gracefully.

  • httpretty - Package httpretty prints the HTTP requests you make with Go pretty on your terminal.

  • Resty - Simple HTTP and REST client library for Go.

  • Typhon - Wrapper around Go's net/http to provide safety and convenience.

GraphQL

  • gqlgen - Library for quickly creating strictly typed graphql servers in golang.

  • gq - Library to help build GraphQL server in Go.

Flag parsing

  • go-flags - Provides an extensive command line option parser.

DB

  • db - Productive data access layer for Go.

  • Gorm - Fantastic ORM library for Golang, aims to be developer friendly.

  • pg - Golang ORM with focus on PostgreSQL features and performance.

  • zoom - Blazing-fast datastore and querying engine for Go built on Redis.

  • bolter - View BoltDB file in your terminal.

  • pg_query_go - Go library to parse and normalize SQL queries using the PostgreSQL query parser.

  • SQLBoiler - Tool to generate a Go ORM tailored to your database schema.

  • sqlmw - Provides an absurdly simple API that allows a caller to wrap a database/sql driver with middleware.

  • go-mysql - Pure go library to handle MySQL network protocol and replication.

  • Redcon - Custom Redis server framework for Go that is fast and simple to use.

ML

  • gobrain - Neural Networks written in go.

  • wann - Weight Agnostic Neural Networks in Go.

API bindings

Graphics

  • pbr - Implements Physically-Based Rendering via a unidirectional CPU-only Monte Carlo path tracer.

macOS

  • apfs - Package apfs implements an Apple File System(apfs) bindings for Go.

Docker

Linux

  • go-criu - Go Bindings for CRIU.

  • rtnetlink - Provides low-level access to the Linux rtnetlink API.

  • go-fuse - Go native bindings for the FUSE kernel module.

Other

  • go-funk - Modern Go utility library which provides helpers (map, find, contains, filter, ...).

  • Argum - Parse incoming arguments in to structure.

  • Graphql - Simple low-level GraphQL HTTP client.

  • ws - WebSocket implementation in Go.

  • GraphQL Go - Implementation of GraphQL.

  • Mock - Mocking framework.

  • jstream - Streaming JSON parser.

  • cmux - Connection multiplexer for GoLang: serve different services on the same port.

  • go-cloud - Library and tools for open cloud development in Go.

  • go-jsonschema - Tool to generate Go data types from JSON Schema definitions.

  • go-write - Package write provides a way to atomically create or replace a file or symbolic link.

  • go-metrics - Go port of Coda Hale's Metrics library.

  • lorca - Build cross-platform modern desktop apps in Go + HTML5.

  • gocc - Parser / Scanner Generator.

  • k8s - Simple Kubernetes Go client.

  • go-plist - Pure Go Apple Property List transcoder.

  • gomail - Best way to send emails in Go.

  • validator - Implements variable validations.

  • go-jira - Go client library for Atlassian JIRA.

  • go-redis - Type-safe Redis client for Golang.

  • esc - Simple file embedder for Go.

  • certmagic - Automatic HTTPS for any Go program: fully-managed TLS certificate issuance and renewal.

  • gogrep - Search for Go code using syntax trees.

  • llvm - Library for interacting with LLVM IR in pure Go.

  • ssh - Easy SSH servers in Golang.

  • retry - Functional mechanism based on channels to perform actions repetitively until successful.

  • ytdl - YouTube download library and CLI written in Go.

  • go-cty - Type system for dynamic values in Go applications.

  • avo - Generate x86 Assembly with Go.

  • govaluate - Arbitrary expression evaluation for golang.

  • Stats - Well tested and comprehensive Golang statistics library package with no dependencies.

  • go-travis - Go library for accessing the Travis CI API V3.

  • Konfig - Composable, observable and performant config handling for Go for the distributed processing era.

  • gRPC-Go - Go language implementation of gRPC. HTTP/2 based RPC.

  • gocontracts - Tool for design-by-contract in Go.

  • apex-go - Golang runtime for Apex/Lambda.

  • go-colorful - Library for playing with colors in go.

  • go-jira - Simple command line client for Atlassian's Jira service written in Go.

  • envsubst - Environment variables substitution for Go.

  • gocraft/work - Lets you enqueue and processes background jobs in Go. Jobs are durable and backed by Redis.

  • easyjson - Provides a fast and easy way to marshal/unmarshal Go structs to/from JSON without the use of reflection.

  • go-elasticsearch - Official Go client for Elasticsearch.

  • DiffParser - Golang package which parse's a git diff.

  • Minify - Go minifiers for web formats.

  • parse - Contains several lexers and parsers written in Go.

  • filetype - Small and dependency free Go package to infer file and MIME type checking the magic numbers signature.

  • pudge - Fast and simple key/value store written using Go's standard library.

  • Wire - Code generation tool that automates connecting components using dependency injection.

  • go-consistent - Source code analyzer that helps you to make your Go programs more consistent.

  • Webview - Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and MSHTML (Windows).

  • sse - Server-Sent Events implementation in Go. Used by the Gin Framework.

  • Go Daemon - Daemon package for use with Go (golang) services with no dependencies.

  • Go JSON Schema Reflection - Can be used to generate JSON Schemas from Go types through reflection.

  • simpletable - Simple tables in terminal with Go.

  • Immutable - Immutable collections for Go.

  • conjungo - Merge utility designed for flexibility and customizability.

  • go-misc - Miscellaneous Go hacks.

  • Slim - Surprisingly space efficient data types in Golang.

  • go-multierror - Represent a list of errors as a single error.

  • jobs - Persistent and flexible background jobs library for go.

  • tracerr - Golang errors with stack trace and source fragments.

  • go-guerrilla - Mini SMTP server written in golang.

  • Fyne - Easy to use UI toolkit and app API written in Go.

  • gofeed - Parse RSS and Atom feeds in Go.

  • Logrus - Structured, pluggable logging for Go.

  • AwGo - Go library for Alfred workflows.

  • Go Keychain - Library for accessing the Keychain for macOS, iOS, and Linux in Go (golang).

  • Oto - Low-level library to play sound. This package offers io.WriteCloser to play PCM sound.

  • afero - FileSystem Abstraction System for Go.

  • Jingo - Provides the ability to encode golang structs to a buffer as JSON very quickly.

  • goldmark - Markdown parser written in Go. Easy to extend, standard compliant, well structured.

  • wails - Create desktop apps using Go and Web Technologies.

  • hashmap - Golang lock-free thread-safe HashMap optimized for fastest read access.

  • go-fuzzyfinder - Go library that provides fuzzy-finding with an fzf-like terminal user interface.

  • httpmock - HTTP mocking for Golang.

  • websocket - A minimal and idiomatic WebSocket library for Go.

  • script - Making it easy to write shell-like scripts in Go.

  • Sling - Go HTTP client library for creating and sending API requests.

  • Geziyor - Fast web crawling & scraping framework for Go.

  • demangle - C++ symbol name demangler written in Go.

  • gamut - Generate and manage color palettes & schemes.

  • sqlx - General purpose extensions to golang's database/sql.

  • bindata - Turn data file into go code.

  • ObjectBox Go API - Persisting your Go structs/objects superfast and simple.

  • panicparse - Crash your app in style in Go.

  • periph - Peripherals I/O in Go.

  • draw2d - 2D rendering for different output (raster, pdf, svg).

  • go-systemd - Go bindings to systemd socket activation, journal, D-Bus, and unit files.

  • sqlc - Composable, type safe and fluent API to generate nested and complex SQL queries.

  • cloudflare-go - Go library for the Cloudflare v4 API.

  • valkeyrie - Distributed Key/Value Store Abstraction Library written in Go.

  • pstree - Simple minded package to retrieve the process tree from a given PID.

  • mysql - MySQL driver for Go's (golang) database/sql package.

  • fastcache - Fast thread-safe inmemory cache for big number of entries in Go. Minimzes GC overhead.

  • expr - Evaluate expression in Go.

  • compress - Optimized compression packages.

  • Casbin - Authorization library that supports access control models like ACL, RBAC, ABAC in Golang.

  • JobRunner - Framework for performing work asynchronously, outside of the request flow.

  • v8go - Execute JavaScript from Go.

  • tview - Rich interactive widgets for terminal-based UIs written in Go.

  • Jennifer - Code generator for Go.

  • nosurf - HTTP package for Go that helps you prevent Cross-Site Request Forgery attacks.

  • jit - Go module for executing machine code directly.

  • Ristretto - High performance memory-bound Go cache.

  • Watermill - Building event-driven applications easy way in Go. (CQRS implementation in Watermill)

  • Aero - High-performance web server for Go.

  • rain - BitTorrent client and library in Go.

  • Jet - Type safe SQL Builder for Go with automatic scan to desired arbitrary object structure.

  • ent - An Entity Framework For Go. Simple, yet powerful ORM for modeling and querying data.

  • Ebiten - Dead simple 2D game library in Go.

  • Muon - Lightweight alternative to Electron written in Golang in about ~300 LoC, using Ultralight instead of Chromium.

  • gnet - High-performance, lightweight, non-blocking, event-driven networking framework written in pure Go.

  • env - Simple lib to parse envs to structs in Go.

  • go-execute - Wrapper for executing commands in Go.

  • pie - Code generator for dealing with slices that focuses on type safety, performance and immutability.

  • govalidator - Package of validators and sanitizers for strings, numerics, slices and structs.

  • gocraft/dbr - Additions to Go's database/sql for super fast performance and convenience.

  • httpauth - Go (lang) HTTP session authentication.

  • syncmap - Typed implementation of the Go sync.Map using code generation.

  • BadgerHold - Embeddable NoSQL store for querying Go types built on Badger.

  • jeff - Provides the simplest way manage web sessions in Go.

  • GoGi - Native Go (golang) Graphical Interface system (2D and 3D), built on GoKi tree framework.

  • sklearn - Partial port of scikit-learn to Go.

  • quicktemplate - Fast, powerful, yet easy to use template engine for Go. Optimized for speed, zero memory allocations in hot paths.

  • go-sx - Provides some extensions to the standard library database/sql package.

  • json-iterator/go - High-performance 100% compatible drop-in replacement of "encoding/json".

  • TamaGo - Bare metal Go for ARM SoCs.

  • go-pretty - Utilities to prettify console output of tables, lists, text, etc.

  • Go Terminput - Provides terminal keyboard input for interactive command-line tools.

  • Termd - Provides terminal markdown rendering, with code block syntax highlighting support.

  • Tea - Provides an Elm inspired functional framework for interactive command-line programs.

  • Lattigo - Lattice-based cryptographic library in Go.

  • orderedmap - Ordered map in Go with amortized O(1) for Set, Get, Delete and Len.

  • validator - Go Struct and Field validation, including Cross Field, Cross Struct, Map, Slice and Array diving.

  • cast - Safe and easy casting from one type to another in Go.

  • go-reuseport - Reuse tcp/udp ports in golang.

  • Genesis - Typesafe concurrent generic functions for Go.

  • redis - Efficient Redis client.

  • vfsgen - Takes an input http.FileSystem (likely at go generate time) and generates Go code that statically implements it.

  • when - Natural language date/time parser with pluggable rules.

  • hashstructure - Get hash values for arbitrary values in Go.

  • Suture - Provides Erlang-ish supervisor trees for Go.

  • Reign - Rewrite Erlang In Go Nicely - a library for mimicking Erlang's mailboxes and clustering.

  • null - Reasonable handling of nullable values.

  • dynamo - Expressive DynamoDB library for Go.

  • Onelog - Dead simple, super fast, zero allocation and modular logger for Golang.

  • encoding - Go package containing implementations of efficient encoding, decoding, and validation APIs.

  • go-execute - Automate commands with Go.

  • go-netstat - Netstat implementation written in Go.

  • sqlc - Generate type safe Go from SQL. (Article)

  • Go-Readability - Go package that cleans a HTML page for better readability.

  • netlink - Simple netlink library for go.

  • desync - Alternative casync implementation.

  • errors - Simple error handling primitives.

  • logr - Simple logging interface for Go.

  • cron - Cron library for go.

  • INI - Package ini provides INI file read and write functionality in Go.

  • reload - Lightweight automatic reloading of Go processes.

  • go-jsonstruct - Generate Go structs from multiple JSON objects.

  • service - Run go programs as a service on major platforms.

  • Boom Filters - Probabilistic data structures for processing continuous, unbounded streams.

  • xorfilter - Go library implementing xor filters.

  • fastjson - Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection.

  • eris - Provides a better way to handle, trace, and log errors in Go. (HN)

  • easypki - Creating a certificate authority the easy way.

  • BigCache - Efficient cache for gigabytes of data written in Go. (HN)

  • go-geom - Go library for handling geometries.

  • endless - Zero downtime restarts for go servers (Drop in replacement for http.ListenAndServe).

  • Sprig - Useful template functions for Go templates.

  • pdfcpu - PDF processor written in Go.

  • Sqlvet - Performs static analysis on raw SQL queries in your Go code base. (HN)

  • matchr - Approximate string matching library for the Go programming language.

  • oauth2 - OAuth2 client in Go.

  • deep - Golang deep variable equality test that returns human-readable differences.

  • goleak - Goroutine leak detector.

  • dotsql - Golang library for using SQL.

  • Authboss - Modular authentication system for the web.

  • kafka-go - Kafka library in Go.

  • ClickHouse - Golang driver for ClickHouse.

  • concurrent-map - Thread-safe concurrent map for go.

  • GoJSONQ - Simple Go package to Query over JSON/YAML/XML/CSV Data.

  • go-zero-width - Zero-width character detection and removal for Go.

  • Automi - Stream processing API for Go.

  • go-resiliency - Resiliency patterns for golang.

  • Event Horizon - CQRS/ES toolkit for Go.

  • FSM - Finite state machine for Go.

  • Gonetics - Go Bioinformatics Library.

  • go-spew - Implements a deep pretty printer for Go data structures to aid in debugging.

  • zerolog - Zero Allocation JSON Logger.

  • SortedMap - Simple value-sorted map type for Go that features constant-time reads and efficient iteration over records.

  • copy - Copy directory recursively.

  • regexp2 - Full featured regular expressions for Go.

  • fsnotify - Cross-platform file system notifications for Go.

  • jwt-go - Golang implementation of JSON Web Tokens (JWT).

  • go-naturaldate - Natural date/time parsing for Go.

  • gpio - Native Go library for Raspberry Pi GPIO.

  • DJSON - Fast Go decoder for dynamic JSON.

  • Gabs - Small utility for dealing with dynamic or unknown JSON structures in Go.

  • go-homedir - Go library for detecting and expanding the user's home directory without cgo.

  • Pigo - Pure Go face detection library.

  • Keyring - Go library providing a uniform interface across a range of secure credential stores.

  • email - Robust and flexible email library for Go.

  • retry - Simple golang library for retry mechanism.

  • go-ps - Find, list, and inspect processes from Go.

  • termbox-go - Pure Go termbox implementation.

  • skv - Simple, persistent key-value storage for Go. (Article)

  • go.rice - Go package that makes working with resources such as html,js,css,images,templates, etc very easy.

  • slug - URL-friendly slugify with multiple languages support.

  • CurlyQ - Provides a simple, easy-to-use interface for performing background processing in Go.

  • Olric - Distributed, eventually consistent, in-memory key/value data store and cache. (HN)

  • licensecheck - Classifies license files and heuristically determines how well they correspond to known open source licenses.

  • Cloud Run helpers - Provides a set of Cloud Run helper functions.

  • go-ws-transport - WebSocket implementation of a go-libp2p transport.

  • go-finance - Contains a collection of financial functions for time value of money (annuities), cash flow, interest rate conversions, bonds and depreciation calculations.

  • go-streams - Go stream processing library.

  • simdjson-go - Golang port of simdjson: parsing gigabytes of JSON per second.

  • monkey - Monkey patching in Go.

  • gopsutil - psutil for golang.

  • schedgroup - Provides a goroutine worker pool which schedules tasks to be performed at or after a specified time.

  • clog - Channel-based logging package for Go.

  • New Relic Go Agent - Allows you to monitor your Go applications with New Relic.

  • MemGuard - Secure software enclave for storage of sensitive information in memory.

  • decimal - Arbitrary-precision fixed-point decimal numbers in go.

  • Clipboard - Provide copying and pasting to the Clipboard for Go.

  • protobuild - Build protobufs in Go, easily.

  • wal - Write ahead log for Go.

  • protoc-go-inject-tag - Inject custom tags to protobuf golang struct.

  • Yamux - Golang connection multiplexing library.

  • protostructure - Go library for encoding and decoding a struct type over the wire.

  • mapstructure - Go library for decoding generic map values into native Go structures.

  • go-expect - Provides an expect-like interface to automate control of applications.

  • dque - Fast embedded durable queue for Go.

  • netboot - Packages and utilities for network booting.

  • image - Set of Go libraries aimed at working in various way with containers' images and container image registries.

  • GoAdmin - Golang framework helps gopher to build a data visualization and admin panel in ten minutes. (Web)

  • go-app-paths - Lets you retrieve platform-specific paths (like directories for app-data, cache, config, and logs).

  • ntp - Simple ntp client package for go.

  • Gorgonia - Library that helps facilitate machine learning in Go.

  • pgzip - Go parallel gzip (de)compression.

  • txeh - Go library and CLI utilty for /etc/hosts management.

  • go-jdk - Run JVM-based code in Go efficiently.

  • WUID - Extremely fast UUID alternative written in golang.

  • jsonq - Simplify your golang json usage by extracting fields or items from arrays and objects with a simple, hierarchical query.

  • SVGo - Go library for SVG generation.

  • go-rate - Rate limiter designed for a range of use cases, including server side spam protection and preventing saturation of APIs you consume.

  • Throttled - Implements rate limiting access to resources such as HTTP endpoints.

  • groupcache - Caching and cache-filling library, intended as a replacement for memcached in many cases.

  • littleboss - Self-supervising Go binaries.

  • go-basher - Library for writing hybrid Go and Bash programs.

  • beeep - Go cross-platform library for sending desktop notifications, alerts and beeps.

  • Whatlanggo - Natural language detection for Go.

  • hystrix-go - Netflix's Hystrix latency and fault tolerance library, for Go.

  • systray - Cross platfrom Go library to place an icon and menu in the notification area.

  • SemVer - Work with Semantic Versions in Go.

  • APNS/2 - Simple, flexible and fast Apple Push Notifications on iOS, OSX and Safari using the new HTTP/2 Push provider API.

  • sanitize - Provides functions for sanitizing text in golang strings.

  • Flect - Inflection engine for golang.

  • TamaGo - Bare metal Go for ARM SoCs.

  • Bloom filters - Bloom filter is a representation of a set of n items, where the main requirement is to make membership queries; i.e., whether an item is a member of a set.

  • goph - Native golang ssh client to execute your commands over ssh connection.

  • mem - Cheap Go type to hold & operate on either a read-only []byte or string.

  • cgroups - Go package for creating, managing, inspecting, and destroying cgroups.

  • go-codec - Idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org.

  • unik - Go module for running Go programs as unikernels, without an underlying operating system. (HN)

  • Mimic - Define your Configuration, Infrastructure and Deployments as Go Code.

  • workerpool - Concurrency limiting goroutine pool.

  • mimetype - Simple golang library for detecting the MIME type and file extension, based on magic numbers.

  • keybd_event - Simulates the key press on a keyboard.

Last updated