Table of Contents
- doc
- Install packages
- Awesome go
- Update packages
- Necessary dev tools
- Programming
- goroutine/chanel
- Performance
- Test
- Data Structure
- Code generator
- IO
- File format
- Algorithm
- Marchine Learning
- Math
- Statistics
- NLP
- Util
- Code generator
- CLI
- JSON
- Serialization
- Text
- Markdown
- WEB
- Cache
- DB
- GUI
- Figure and Chart
- Image
- Graphics
- HPC
- Distributed systems
- Flow / piple
- Glue
- misc
- A curated selection of blog posts on Go
- Ten Useful Techniques in Go
- Effective Go in chinese
- (Draft) Traps, Gotchas, and Common Mistakes in Go (golang)
- Rob Pike的Go语言PPT教程翻译1,2,3
- Translating Effective Python into Go: Know When to Use Channels for Generator-Like Functions
- go-best-practices-2016
- 年终盘点!2017年超有价值的Golang文章
- go-under-the-hood Go 语言原本
Use proxy, or use Gopm.
http_proxy=127.0.0.1:8087 go get **
for socks5 proxy
sudo dnf install privoxy
sudo echo forward-socks5 / 127.0.0.1:1080 . >> /etc/privoxy/config
sudo service privoxy restart
http_proxy=127.0.0.1:8118 go get **
Godoc and vet moved to the go.tools subrepository since go1.2, so
# go get code.google.com/p/go.tools/cmd/...
More official sub-repositories
- crypto — additional cryptography packages.
- net — additional networking packages.
- sys — packages for making system calls.
- text — packages for working with text.
- tools — godoc, vet, cover, and other tools.
- exp — experimental code (handle with care; may change without warning).
install them
https_proxy=https://127.0.0.1:8118 go get -v golang.org/x/tools/cmd/{godoc,goimports,gorename,vet,gomvpkg,cover}
other great tools
go get -v github.com/golang/lint/golint
go get -v github.com/sqs/goreturns
update xcode-go
proxychains go get -u github.com/acroca/go-symbols
proxychains go get -u github.com/davidrjenni/reftools/cmd/fillstruct
proxychains go get -u github.com/haya14busa/goplay/cmd/goplay
proxychains go get -u github.com/mdempsky/gocode
proxychains go get -u github.com/sqs/goreturns
proxychains go get -u github.com/uudashr/gopkgs/v2/cmd/gopkgs
proxychains go get -u github.com/zmb3/gogetdoc
proxychains go get -u golang.org/x/lint/golint
proxychains go get -u golang.org/x/tools/cmd/gorename
proxychains go get -u golang.org/x/tools/gopls
proxychains go get -u github.com/cweill/gotests/...
proxychains go get -u github.com/rogpeppe/godef
proxychains go get -u github.com/ramya-rao-a/go-outline
proxychains go get -u github.com/go-delve/delve/cmd/dlv
go get -u github.com/astaxie/beego
Or use gofresh (Keep your Go package dependencies fresh.)
- gometalinter - Concurrently run Go lint tools and normalise their output
- goimports, see more
- Good Code vs Bad Code in Golang
- go-patterns - A curated list of Go patterns and idioms http://tmrts.com/go-patterns
- composable-go-services-using-libchan/
- libchan - Like Go channels over the network,
- Interfaces in Go Object Oriented Go
- Go Traps
- 50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs
- Who needs generics? Use ... instead!, Summary of Go Generics Discussions
- Practical advice for Go library authors
- Why are slices sometimes altered when passed by value in Go?
- How to ship production-grade Go
- There is no pass-by-reference in Go
- The ultimate guide to writing a Go tool
- Allocation Efficiency in High-Performance Go Services
- Memory Blocks in Go
- Writing a very fast cache service with millions of entries in Go
- The empty struct{}
- 译文 如何使用 Go 1.13 里的错误处理
- GO编程模式系列
packages
- go-promise - A library implement futrue and promise
- bufferManager.go - bufferManager demonstrates a technique to decrease pressure on GC in Go.
tutorials
- Using contexts to avoid leaking goroutines
- Mastering concurrency in Go
- Go channels are bad and you should feel bad
- Channels in Golang
- How To Close Channels in Golang Elegantly
packages
- go-broadcast - A trivial channel pubsub I use in lots of projects. http://godoc.org/github.com/dustin/go-broadcast
- tunny - A goroutine pool for golang
- abool - Atomic Boolean library for cleaner Golang code, optimized for performance yet simple to use.
-
writing-high-performance-go The compiler implements a specific optimisation for this case
var m map[string]string v, ok := m[string(bytes)]
This will avoid the conversion of the byte slice to a string for the map lookup. This is very specific, it won't work if you do something like
key := string(bytes) val, ok := m[key]
-
gcvis - Visualise Go program GC trace data in real time http://dave.cheney.net/2014/07/11/visualising-the-go-garbage-collector
-
go-torch - Stochastic flame graph profiler for Go programs
-
go-filemutex - Like sync.Mutex, but works across processes
Packages:
Applications:
- rush -- parallelly execute shell commands. A GNU parallel like tool in Go. It supports Linux/OS X/Windows!
- testify - A toolkit with common assertions and mocks that plays nicely with the standard library
- gotests - Generate better Go tests from your source code.
- go-datastructures - Go-datastructures is a collection of useful, performant, and threadsafe Go datastructures.
- golang-set - A simple set type for the Go language.
- set - Set is a basic and simple, hash-based, Set data structure implementation in Go (Golang)
- set - General, type-safe, non-allocating set-operations for any sort.Interface
- pmap (ParallelMap) - A lock-free parallel map in go
- concurrent-map - provides a high-performance solution to this by sharding the map with minimal time spent waiting for locks.
- lane - A golang queues, stacks and deques implementation library
- btree - by google
- btree - tidwall's folk
- bloom - Go package implementing Bloom filters
- cfilter - Cuckoo Filter implementation in Go, better than Bloom Filters
- bitset - Go package implementing bitsets
- countminsketch - An implementation of Count-Min Sketch in Golang
- BoomFilters - Probabilistic data structures for processing continuous, unbounded streams. This includes Stable Bloom Filters, Scalable Bloom Filters, Counting Bloom Filters, Inverse Bloom Filters, Cuckoo Filters, several variants of traditional Bloom filters, HyperLogLog, Count-Min Sketch, and MinHash
- cuckoofilter - Cuckoo Filter: Practically Better Than Bloom
- goraph - Package goraph implements graph, tree data structures and algorithms.
- go-radix - Golang implementation of Radix trees, go-immutable-radix
- sortutil - Utilities supplemental to the Go standard "sort" package
- golib/sort - Parallel Quicksort.
- go-minhash - BottomK minwise hashing for streaming set similarity
- hyperloglog - HyperLogLog and HyperLogLog++ implementation in Go/Golang. http://godoc.org/github.com/clarkduvall/hyperloglog
- hyperloglog - HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction)
- mafsa - Package mafsa implements Minimal Acyclic Finite State Automata in Go, essentially a high-speed, memory-efficient, Unicode-friendly set of strings. https://godoc.org/github.com/smartystreets/mafsa
Persistent
- goque - Persistent stacks, queues, and priority queues for Go backed by LevelDB
- gen - Type-driven code generation for Go http://clipperhouse.github.io/gen/
- gengen - A Go source transformation tool for generics
- generic - A code generation tool to enable generics in go
- genny - Elegant generics for Go
- xopen - open files for buffered reading and writing in #golang
- readahead - Asynchronous read-ahead for Go readers
- pgzip - Go parallel gzip (de)compression
- compress - Optimized compression packages
- breader - breader (Buffered File Reader), asynchronous parsing and pre-processing while reading file. Safe cancellation is also supported.
- xlsx - Google Go (golang) library for reading and writing XLSX files.
- multicorecsv - A multicore csv reader library in Go. 3X
- copmress - Collection of compression related Go packages.
- csvtk - Another cross-platform, efficient, practical and pretty CSV/TSV toolkit in Golang http://bioinf.shenwei.me/csvtk
- graph - Graph packages for the Go language
- golearn - Machine Learning for Go
- gonn -GoNN is an implementation of Neural Network in Go Language, which includes BPNN, RBF, PCN
- CloudForest - Ensembles of decision trees in go/golang.
- bayesian - Naive Bayesian Classification for Golang.
- go-galib - Genetic Algorithms library written in Go / golang
- algorithms - Algorithms & Data Structures in Go
- gorgonia - Gorgonia is a library that helps facilitate machine learning in Go.
- stats - A statistics package with common functions that are missing from the Golang standard library.
- stat - https://github.com/grd/stat t-test
- stat - Statistics package for Go
log
- log4go - Logging package similar to log4j for the Go programming language
- log15 - Simple, powerful logging for Go
Others
- gouuid - Pure Go UUID implementation
- basex - Create Youtube-Like IDs With Golang
- quarnster/util - Various Go utility code
- daemon - A daemon package for use with Go (golang) services with no dependencies
- shutdown - Shutdown management library for Go
- Gox - Simple Go Cross Compilation。更新go版本后,记得gox -build-toolchain
- goxc - a build tool for Go, with a focus on cross-compiling, packaging and deployment
- clipboard - clipboard for golang
- go.pipeline - go.pipeline is a utility library that imitates unix pipeline. It simplifies chaining unix commands (and other stuff) in Go.
- go-qrcode - ✨ QR Code encoder (Go) http://go-qrcode.appspot.com
- commonregex - A collection of common regular expressions for Go
- cwalk - cwalk = Concurrent filepath.Walk replacement (Go)
Date
- monday - Monday is a minimalistic translator for month and day of week names in time.Date objects
- Now - Now is a time toolkit for golang
Debug
- go-spew - Go-spew implements a deep pretty printer for Go data structures to aid in debugging.
- Debugging Goroutines: How to debug like a pro
Release
- staticfiles - staticfiles compiles a directory of files into an embeddable .go
- govvv – Versioning for Go binaries
- go-poet - A Go package for generating Go code
- cobra - A Commander for modern Go CLI interactions
- flag2 - A more traditional flag library for the go programming language
- writ - A flexible command and option parser for Go
- go-arg - Struct-based argument parsing in Go
- cli - A small package for building command line apps in Go
- color - Color package for Go (golang) http://godoc.org/github.com/fatih/color . It has support for Windows too
- emoji - emoji terminal output for golang
- go-sh - like python-sh, for easy call shell with golang.
- uitable - A go library to improve readability in terminal apps using tabular data
- uiprogress - A go library to render (multi) progress bars in terminal applications.
- barely - Simple and extensible status bar to pretty display of Go-lang program's progress
- pb - Console progress bar for Golang
- viper -Go configuration with fangs
- goconfig - goconfig is a easy-use comments-support configuration file(.ini) parser for the Go Programming Language
- go-homedir - Go library for detecting and expanding the user's home directory without cgo.
- go-prettytable - A library for Golang to build a simple text table with a multibyte, doublewidth character support
- 教你写一个color日志库,不止有代码还有原理。
- tablewriter - ASCII table in golang
- Handling CTRL-C (interrupt signal) in Golang Programs
- multibar - Display multiple progress bars in Go (golang).
- spinner - Go (golang) package for providing a terminal spinner/progress indicator with options.
- go-prompt - Building a powerful interactive prompt in Go, inspired by python-prompt-toolkit.
- promptui - Interactive prompt for command-line applications
- beeep - Go cross-platform library for sending desktop notifications and beeps
- gjson - Get JSON values very quickly in Go
- megajson - A JSON parser generator for high performance encoding and decoding in Go.
- gojson - A simple command-line tool for manipulating JSON for use in developing Go cod
- jsonpp - A command line JSON pretty printer.
Needing code generation
Using reflection
xxx
- jsonparser - Alternative JSON parser for Go that does not require schema (so far fastest)
- gojay - fastest JSON encoder/decoder with powerful stream API for Golang
- json-iterator/go - A high-performance 100% compatible drop-in replacement of "encoding/json"
- fastjson - Fast JSON parser and validator for Go. No custom structs, no code generation, no reflection
- go-humanize - Go Humans! (formatters for units to human friendly sizes) https://godoc.org/github.com/dustin/go-humanize
- A modern text indexing library for go
- govalidator - Package of string validators and sanitizers for Go lang
- iconv - Golang bindings to libiconv - Convert string to requested character encoding
- diff - Go difference algorithm
- bmatch is faster fixed pattern search for Go.
- bleve - A modern text indexing library for go
- blackfriday - a markdown processor for Go
doc
packages
- gorilla - Gorilla web toolkit
- go.rice is a Go package that makes working with resources such as html,js,css,images,templates, etc very easy.
- 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. Building Go Web Applications and Microservices Using Gin
- beego - beego is an open-source, high-performance web framework for the Go programming language. http://beego.me
- echo - Echo is a fast 🚀 and unfancy micro web framework for Golang. http://echo.labstack.com
- ace - HTML template engine for Go http://ace.yoss.si/
- osin - Golang OAuth2 server library
- go-oauth - OAuth 1.0 client package for Go
- go-http-auth - Basic and Digest HTTP Authentication for golang http
- gomniauth - Authentication framework for Go applications.
- hawk - HTTP Holk Authentication Schemz
- gopencils - Easily consume REST APIs with Go (golang)
- code.google.com/p/go.crypto/ssh - Package ssh implements an SSH client and server. example
- go-pkg-rss - reads RSS and Atom feeds and provides a caching mechanism that adheres to the feed specs.
- feeds - golang rss/atom generator library
- postman - Command-line utility for batch-sending email. http://zachlatta.com/postman
- gomail - The best way to send emails in Go.
- go-i18n - Translate your Go program into multiple languages with templates and CLDR plural support.
- gorequest - GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent ) http://parnurzeal.github.io/gorequest/
- melody - Minimalist websocket framework for Go
KV
- goleveldb - LevelDB key/value database in Go.
- bolt - A low-level key/value database for Go.
- storm - Simple and powerful toolkit for BoltDB
- etcd - A highly-available key value store for shared configuration and service discovery
- badger - An embeddable, persistent, simple and fast key-value (KV) store, written natively in Go. Optimize for SSDs
In-memory
- buntdb - BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
- summitdb - In-memory NoSQL database with ACID transactions, Raft consensus, and Redis API
- go-memdb - Golang in-memory database built on immutable radix trees
- yakdb - yakdb (yet another key-value database) is a highly-performant in-memory key-value store written in Go. http://vicvijayakumar.com/yakdb-a-nosql-database-in-go.html
doc
- tiedot - a document database engine that uses JSON as document notation
rich data structure
- SSDB - A fast NoSQL database for storing big list of data
- ledisdb - a high performance NoSQL powered by Go
- tidb - TiDB is a distributed SQL database compatible with MySQL protocol.
graph
- dgraph - Scalable, Distributed, Low Latency Graph Database
- gorm - The fantastic ORM library for Golang, aims to be developer friendly
- go-sqlite3 - sqlite3 driver for go that using database/sql http://mattn.kaoriya.net/
- beego orm - A powerful orm framework for go
- qbs - QBS stands for Query By Struct. A Go ORM
- go-qt5 - qt5 bindings for go
- plotinum - A plotting library for the Go programming language.
- chart - Basic charts in go. This package focuses more on autoscaling, error bars, and logarithmic plots than on beautifull or marketing ready charts.
- gosplat - Easily generate html/js graphs in go with dygraphs/gochart
- svgo - Go Language Library for SVG generation. paper, slide
- gonum/plot, example
- gift - Go Image Filtering Toolkit
- bild - A collection of parallel image processing algorithms in pure Go
- gg - Go Graphics - 2D rendering in Go with a simple API. https://godoc.org/github.com/fogleman/gg
3D
- ln - 3D line art engine.
- signintech/gopdf - A simple library for generating PDF written in Go lang [Chinese supported]
- gofpdf - A PDF document generator with high level support for text, drawing and images [Chinese not supported]
- hpcgo - Helping submit jobs to HPC cluster
- mpi - mpi-binding for golang
- circuit
- go-workers - Sidekiq compatible background workers in golang
- glow - Glow is an easy-to-use distributed computation system written in Go, similar to Hadoop Map Reduce, Spark, Flink, Samza, etc. Currently just started and not feature rich yet, but should be reliable to run most common cases.
- Go kit is a distributed programming toolkit for building microservices in large organizations.
- gam - Go Actor Model framework - Ultra fast distributed actors for Golang
- rpcx - rpcx is a distributed RPC service framework based net/rpc like alibaba Dubbo and weibo Motan. Implemented by Go
- mesh - Mesh is a tool for building distributed applications.
- Beehive Beehive is a distributed programming framework that comes with built-in transactions, replication, fault-tolerance, runtime instrumentation, and optimized placement.
- How we use gRPC to build a client/server system in Go
- goflow - Flow-based and dataflow programming library for Go programming language
- gopy generates a CPython extension module from a go package.
See more on awesome-go, golang opensource projects