分类目录归档:GO开发

无阻塞channel

ch := make(chan int, 10)
	go func() {
		for{
			<-ch
		}
	}()
	for i := 0; i < 100; i++ {
		select {
		case ch <- i: // thank goodness
			log.Println(fmt.Sprintf("msgchan:%v", i))
			break
		default: // hm, push i to storage?
			log.Println(fmt.Sprintf("default:%v", i))
			break
		}
		time.Sleep(time.Microsecond)
	}

GoLang处理数组

//query='[{"client_ver":"10.0.0.5","plug_name":"Kaiwpp","plug_ver":"1.0.0.5","distsrc":"student"}]'
var params []interface{}
err := json.Unmarshal([]byte(query), ¶ms);

validator检验

package validator

import (
	"fmt"
	"reflect"
)


func isStructPtr(t reflect.Type) bool {
	return t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Struct
}

func isNilOrZero(v reflect.Value) bool {
	switch v.Kind() {
	default:
		return reflect.DeepEqual(v.Interface(), reflect.Zero(v.Type()).Interface())
	case reflect.Interface, reflect.Ptr:
		return v.IsNil()
	}
}

func CheckRequired(obj interface{}, fields ...string) error  {
	reflectType := reflect.TypeOf(obj)
	reflectValue := reflect.ValueOf(obj)
	if !isStructPtr(reflectType) {
		return fmt.Errorf(
			"expected unnamed object value to be a pointer to a struct but got type %s "+
				"with value %v",
			reflectType,
			obj,
		)
	}
	elem := reflectValue.Elem()
	for i := 0; i < len(fields); i++ {
		name := fields[i]
		val := elem.FieldByName(name)
		if isNilOrZero(val) {
			return fmt.Errorf("the field of [ %s ] can't be empty", name)
		}
	}
	return nil
}


优秀的GoLang库

日志类
https://github.com/sirupsen/logrus
ORM类
https://github.com/jinzhu/gorm #最强,包括数据库迁移。
https://github.com/go-xorm/xorm #最少依赖

Go语言(golang)开源项目大全

http://www.open-open.com/lib/view/open1396063913278.html
内容目录
Astronomy
构建工具
缓存
云计算
命令行选项解析器
命令行工具
压缩
配置文件解析器
控制台用户界面
加密
数据处理
数据结构
数据库和存储
开发工具
分布式/网格计算
文档
编辑器
Encodings and Character Sets
Games
GIS
Go Implementations
Graphics and Audio
GUIs and Widget Toolkits
Hardware
Language and Linguistics
日志
机器学习
Mathematics
Misc
Music
网络
Operating System Interfaces
Other Random Toys, Experiments and Example Code
P2P和文件共享
Programming
Scanner and Parser Generators
Simulation Modeling
Sorting
源代码管理
Strings and Text
Testing
Virtual Machines and Languages
Web Applications
Web Libraries
Windows
Unix
Unsorted; please help!
Astronomy
gonova – A wrapper for libnova — Celestial Mechanics, Astrometry and Astrodynamics Library
meeus – Implementation of “Astronomical Algorithms” by Jean Meeus
novas – Interface to the Naval Observatory Vector Astrometry Software (NOVAS)
go-fits – FITS (Flexible Image Transport System) format image and data reader
Build Tools
colorgo – Colorize go build output
fileembed-go – This is a command-line utility to take a number of source files, and embed them into a Go package
gb – A(nother) build tool for go, with an emphasis on multi-package projects
GG – A build tool for Go in Go
go-pkg-config – lightweight clone of pkg-config
goam – A simple project build tool for Go
godag – A frontend to the Go compiler collection
goenv – goenv provides Go version and Go workspace management tools
goscons – Another set of SCons builders for Go
gotgo – An experimental preprocesor to implement ‘generics’
goxc – A build tool with a focus on cross-compiling, packaging, versioning and distribution
GVM – GVM provides an interface to manage Go versions
SCons Go Tools – A collection of builders that makes it easy to compile Go projects in SCons
Caching
cache2go – A caching library with expiration capabilities and access counters
go-cache – An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications
gomemcache – a memcached client
gomemcached – A memcached server in go
groupcache – Caching and cache-filling library, intended as a replacement for memcached in many cases
libmemcache – Fast client and server libraries speaking memcache protocol
memcache – go memcached client, forked from YouTube Vitess
memcached – Fast memcache server, which supports persistence and cache sizes exceeding available RAM
memcached-bench – Benchmark tool for memcache servers
YBC bindings – Bindings for YBC library providing API for fast in-process blob cache
Cloud Computing
Docker – The Linux container runtime. Developed by dotCloud.
gocircuit – A distributed operating system that sits on top of the traditional OS on multiple machines in a datacenter deployment. It provides a clean and uniform abstraction for treating an entire hardware cluster as a single, monolithic compute resource. Developed by Tumblr.
gosync – A package for syncing data to and from S3.
juju – Orchestration tool (deployment, configuration and lifecycle management), developed by Canonical.
ShipBuilder – ShipBuilder is a minimalist open source platform as a service, developed by Jay Taylor.
Tsuru – Tsuru is an open source polyglot cloud computing platform as a service (PaaS), developed by Globo.com.
swift – Go language interface to Swift / Openstack Object Storage / Rackspace cloud files
Command-line Option Parsers
argcfg – Use reflection to populate fields in a struct from command line arguments
cobra – A commander for modern go CLI interactions supporting commands & POSIX/GNU flags
command – Add subcommands to your CLI, provides help and usage guide.
getopt – Yet Another getopt Library for Go. This one is like Python’s.
getopt – full featured traditional (BSD/POSIX getopt) option parsing in Go style
gnuflag – GNU-compatible flag parsing; substantially compatible with flag.
go-flags – command line option parser for go
go-options – A command line parsing library for Go
goopt – a getopt clone to parse command-line flags
options – Self documenting CLI options parser
opts.go – lightweight POSIX- and GNU- style option parsing
pflag – Drop-in replacement for Go’s flag package, implementing POSIX/GNU-style –flags.
subcommands – A concurrent, unit tested, subcommand library
go-commander – Simplify the creation of command line interfaces for Go, with commands and sub-commands, with argument checks and contextual usage help. Forked from the “go” tool code.
uggo – Yet another option parser offering gnu-like option parsing. This one wraps (embeds) flagset. It also offers rudimentary pipe-detection (commands like ls behave differently when being piped to).
Command-line Tools
GoPasswordCreator – A small tool, which creates random passwords
gich – A cross platform which utility written in Go
gocreate – Command line utility that create files from templates.
gojson – Command-line tool for manipulating JSON for use in developing Go code.
jsonpp – A fast command line JSON pretty printer.
passhash – Command-line utility to create secure password hashes
pwdgen – A small tool, which generate human password, written in Go.
tecla – Command-line editing library
DevTodo2 – A small command-line per-project task list manager.
Compression
dgolzo – LZO bindings
fast-archiver – Alternative archiving tool with fast performance for huge numbers of small files
gbacomp – A Go library to (de)compress data compatible with GBA BIOS
go-lz4 – Port of LZ4 lossless compression algorithm to Go.
go-lzss – Implementation of LZSS compression algorithm in Go
go-sevenzip – Package sevenzip implements access to 7-zip archives (wraps C interface of LZMA SDK)
go-zip – A wrapper around C library libzip, providing ability to modify existing ZIP archives.
lzma – compress/lzma package for Go
snappy-go – Google’s Snappy compression algorithm in Go
yenc – yenc decoder package
zappy – Package zappy implements the zappy block-based compression format. It aims for a combination of good speed and reasonable compression.
Configuration File Parsers
gcfg – read INI-style configuration files into Go structs; supports user-defined types and subsections
globalconf – Effortlessly persist to and read flag values from an ini config file
goconf – a configuration file parser
toml :
go-toml – Go library for the TOML language
go-toml-config – TOML-based config for Go
toml – TOML parser for Go with reflection
toml-go – An easy-to-use Go parser for the Toml format
gp-config – Subset of TOML syntax with basic and reflection APIs
yaml :
yaml – YAML support for the Go language, by Canonical
goyaml – A port of LibYAML to Go
Console User Interface
ansi – Easily create ansi escape code strings and closures to fomat, color console output
ansiterm – pkg to drive text-only consoles that respond to ANSI escape sequences
gnureadline – GNU Readline bindings
go.linenoise – Linenoise bindings (simple and easy readline with prompt, optional history, optional tab completion)
go-stfl – a thin wrapper around STFL, an ncurses-based widget toolkit
gockel – a Twitter client for text terminals
gocurse – Go bindings for NCurses
gocurses – NCurses wrapper
goncurses – An ncurses library, including the form, menu and panel extensions
gopass – Allows typing of passwords without echoing to screen
igo – A simple interactive Go interpreter built on exp/eval with some readline refinements
oh – A Unix shell written in Go
pty – obtain pseudo-terminal devices
termbox-go – A minimalist alternative to ncurses to build terminal-based user interfaces
termios – Terminal support
termon – Easy terminal-control-interface for Go.
go.sgr – Terminal/console colors and text decoration (bold,underlined,etc).
go-web-shell – Remote web shell, implements a net/http server.
Cryptography
BLAKE2b – Go implementation of BLAKE2b hash function
cryptoPadding – Block padding schemes implemented in Go
dkeyczar – Go port of Google’e Keyczar cryptography library
dkrcrypt – Korean block ciphers: SEED and HIGHT
dskipjack – Go implementation of the SKIPJACK encryption algorithm
go-hc128 – Go implementation of HC-128, an eSTREAM stream cipher
GoSkein – Implementation of Skein hash and Threefisch crypto for Go
keccak – A keccak (SHA-3) implementation
ketama.go – libketama-style consistent hashing
kindi – encryption command line tool
scrypt – Go implementation of Colin Percival’s scrypt key derivation function
simpleaes – AES encryption made easy
ssh.go – SSH2 Client library
siphash – SipHash: a fast short-input pseudorandom function
tiger – Tiger cryptographic hashing algorithm
whirlpool – whirlpool cryptographic hashing algorithm
cryptogo – some useful cryptography-related functions, including paddings (PKCS7, X.923), PBE with random salt and IV
Data Processing
Heka – Real time data and log file processing engine.
gostatsd – Statsd server and library.
proto – Map/Reduce/Filter etc. for Go using channels as result streams.
rrd – Bindings for rrdtool.
Data Structures
Lists
GoArrayList – GoArrayList is a Go language substitute for the Java class ArrayList, with very nearly all features.
goskiplist – A skip list implementation in Go.
itreap – An immutable ordered list, interally a treap.
ListDict – Python List and Dict for Go
skip – A fast position-addressable ordered map and multimap.
skiplist – A skip list implementation. Highly customizable and easy to use.
Skiplist – A fast indexable ordered multimap.
Queues
fifo_queue – Simple FIFO queue
go-priority-queue – An easy to use heap implementation with a conventional priority queue interface.
go.fifo – Simple auto-resizing thread-safe fifo queue.
gopqueue – Priority queue at top of container/heap
gringo – A minimalist queue implemented using a stripped-down lock-free ringbuffer
figo – A simple fifo queue with an optional thread-safe version.
queued – A simple network queue daemon
Graphs
goraph – Graph Visualization, Algorithms
Trees
b – Package b implements B+trees with delayed page split/concat and O(1) enumeration. Easy production of source code for B+trees specialized for user defined key and value types is supported by a simple text replace.
btree – Package btree implements B-trees with fixed size keys, http://en.wikipedia.org/wiki/Btree
go-avltree – AVL tree (Adel’son-Vel’skii & Landis) with indexing added
go-darts – Double-ARray Trie System for golang
go-stree – A segment tree implementation for range queries on intervals
GoLLRB – A Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary search trees in Google Go
rbtree – Yet another red-black tree implementation, with a C++ STL-like API
rtreego – an R-Tree library
gotree – Tree Visualization, Algorithms
Other
asyncwr – Asynchronous, non-blocking, wrapper for io.Writer
bigendian – binary parsing and printing
collections – Several common data structures
data-structures – A collection of data-structures (AVL Tree, B+Tree, Ternary Search Trie, Hash Table (Separate Chaining), Linear Hash Table)
deepcopy – Make deep copies of data structures
dgobloom – A Bloom Filter implementation
epochdate – Compact dates stored as days since the Unix epoch
fsm – Minimalistic state machine for use instead of booleans
go-algs/ed – Generalized edit-distance implementation
go-algs/maxflow – An energy minization tool using max-flow algorithm.
go-extractor – Go wrapper for GNU libextractor
go-maps – Go maps generalized to interfaces
gohash – A simple linked-list hashtable that implements sets and maps
Gokogiri – A lightweight libxml wrapper library
GoNetCDF – A wrapper for the NetCDF file format library
goop – Dynamic object-oriented programming support for Go
goset – A simple, thread safe Set implementation
gotoc – A protocol buffer compiler written in Go
goxml – A thin wrapper around libxml2
itertools – Provides generic iteratable generator function along with functionality similar to the itertools python package.
jsonv – A JSON validator
libgob – A low level library for generating gobs from other languages
Picugen – A general-purpose hash/checksum digest generator.
ps – Persistent data structures
samling – Package samling implements various collection data structures.
tribool – Ternary (tree-valued) logic for Go
Tuple – Tuple is a go type that will hold mixed types / values
vcard – Reading and writing vcard file in go. Implementation of RFC 2425 (A MIME Content-Type for Directory Information) and RFC 2426 (vCard MIME Directory Profile).
x2j – Unmarshal XML doc into mapstringinterface{} or JSON
xlsx – A library to help with extracting data from Microsoft Office Excel XLSX files.
Databases and Storage
See also SQLDrivers page.

MongoDB
mgo – Rich MongoDB driver for Go
MySQL
Go-MySQL-Driver – A lightweight and fast MySQL-Driver for Go’s database/sql package
MyMySQL – MySQL Client API written entirely in Go.
vitess – Scaling MySQL databases for the web
ODBC
go-odbc – ODBC Driver for Go
odbc3-go – This package is wrapper around ODBC (version 3).
PostgreSQL
go-libpq – cgo-based Postgres driver for Go’s database/sql package
go-pgsql – A PostgreSQL client library for Go
pgsql.go – PostgreSQL high-level client library wrapper
pgx – Go PostgreSQL driver that avoids database/sql in exchange for better PostgreSQL specific support
pq – Pure Go PostgreSQL driver for database/sql
QL
ql – A pure Go embedded (S)QL database.
Redis
Go-Redis – Client and Connectors for Redis key-value store
godis – Simple client for Redis
Tideland CGL Redis – Powerful Redis client with pub/sub support.
Redigo – Go client for Redis.
redis – Redis client for Golang
RethinkDB
rethinkgo – Basic Go driver for RethinkDB
SQLite
mattn’s go-sqlite3 – sqlite3 driver conforming to the built-in database/sql interface
gosqlite – a trivial SQLite binding for Go.
gosqlite (forked) – A fork of gosqlite
gosqlite3 – Go Interface for SQLite3
ORM
beedb – beedb is an ORM for Go. It lets you map Go structs to tables in a database
gorm – An ORM library for Go, aims for developer friendly
gorp – SQL mapper for Go
hood – Database agnostic ORM for Go. Supports Postgres and MySQL.
qbs – Query By Struct. Supports MySQL, PosgreSQL and SQLite3.
xorm – A Simple and Powerful ORM for Go.
go-modeldb – A simple wrapper around sql.DB for struct support.
Multiple wrappers
gosexy/db – an abstraction of wrappers for popular third party SQL and No-SQL database drivers.
Key-Value-Stores
dbm – Package dbm (WIP) implements a simple database engine, a hybrid of a hierarchical and/or a key-value one.
Diskv – Home-grown, disk-backed key-value store
etcd – Highly-available key value store for shared configuration and service discovery
gocask – Key-value store inspired by Riak Bitcask. Can be used as pure go implementation of dbm and other kv-stores.
kv – Yet another key/value persistent store. Atomic operations, two phase commit, automatic crash recovery, …
leveldb-go – This is an implementation of the LevelDB key/value database.
levigo – levigo provides the ability to create and access LevelDB databases.
persival – Programatic, persistent, pseudo key-value storage
NoSQL
tiedot – A NoSQL document database engine using JSON for documents and queries; it can be embedded into your program, or run a stand-alone server using HTTP for an API.
Other
cabinet – Kyoto Cabinet bindings for go
cass – Cassandra Client Lib
cdb.go – Create and read cdb (“constant database”) files
CodeSearch – Index and perform regex searches over large bodies of source code
couch-go – newer maintained CouchDB database binding
couchgo – The most feature complete CouchDB Adapter for Go. Modeled after couch.js.
dbxml – A basic interface to Oracle Berkeley DB XML
go-db-oracle – GO interface to Oracle DB
go-notify – GO bindings for the libnotify
go-rexster-client – Go client for the Rexster graph server (part of the TinkerPop suite of graph DB tools)
go-sphinx – A sphinx client package for Go, for full text search.
go-wikiparse – mediawiki dump parser for working with wikipedia data
gographite – statsd server in go (for feeding data to graphite)
gokabinet – Go bindings for Kyoto Cabinet DBM implementation
goprotodb – A binding to Berkeley DB storing records encoded as Protocol Buffers.
goriak – Database driver for riak database (project homepage is now on bitbucket.org)
goriakpbc – Riak driver using Riak’s protobuf interface
gotyrant – A Go wrapper for tokyo tyrant
hdfs – go bindings for libhdfs
JGDB – JGDB stands for Json Git Database
mig – Simple SQL-based database migrations
mongofixtures – A Go quick and dirty utility for cleaning MongoDB collections and loading fixtures into them.
Neo4j-GO – Neo4j REST Client in golang
neoism – Neo4j graph database client, including Cypher and Transactions support.
Optimus Cache Prime – Smart cache preloader for websites with XML sitemaps.
riako – High level utility methods for interacting with Riak databases
Weed File System – fast distributed key-file store
whisper-go – library for working with whisper databases
squirrel – Fluent SQL generation for golang
Development Tools
cwrap – Go wrapper (binding) generator for C libraries.
demand – Download, build, cache and run a Go app easily.
godev – Recompiles and runs your Go code on source change. Also watches all your imports for changes.
GoWatch – GoWatch watches your dev folder for modified files, and if a file changes it restarts the process.
glib – Bindings for GLib type system
gocog – A code generator that can generate code using any language
godiff – diff file comparison tool with colour html output
syntaxhighlighter – language-independent code syntax highlighting library
gonew – A tool to create new Go projects
go-play – A HTML5 web interface for experimenting with Go code. Like http://golang.org/doc/play but runs on your computer
gorun – Enables Go source files to be used as scripts.
go-spew – Implements a deep pretty printer for Go data structures to aid in debugging
goven – Easily copy code from another project into yours
gowatcher – Reload a specified go program automatically by monitoring a directory.
goweb – Literate programming tools for Go based on CWEB by Donald Knuth and Silvio Levy.
hopwatch – simple debugger for Go
hsandbox – Tool for quick exprimentation with Go snippets
Livedev – Livedev is a development proxy server that enables live code reloading.
liccor – A tool for updating license headers in Go source files
liteide – An go auto build tools and qt-based ide for Go
rerun – Rerun watches your binary and all its dependencies so it can rebuild and relaunch when the source changes.
trace – A simple debug tracing
godepgraph – Create a dependency graph for a go package
Emacs Tags
egotags – ETags generator
tago – Emacs TAGS generator for Go source
tago1 – etags generator for go that builds with go 1
Distributed/Grid Computing
donut – A library for building clustered services in Go
locker – A distributed lock service built on top of etcd.
Skynet – Skynet is distributed mesh of processes designed for highly scalable API type service provision.
Documentation
GoDoc.org – GoDoc.org generates documentation on the fly from source on Bitbucket, Github, Google Project Hosting and Launchpad.
Mango – Automatically generate unix man pages from Go sources
godocdown – Format package documentation (godoc) as GitHub friendly Markdown
redoc – Commands documentation for Redis
sphinxcontrib-golangdomain – Sphinx domain for Go
Editors
Go conTEXT – Highlighter plugin for the conTEXT editor
Google Go for Idea – Google Go language plugin for Intellij IDEA
go-gedit – Google Go language plugin for gedit
goclipse – An Eclipse-based IDE for Go.
godev – Web-based IDE for the Go language
gofinder – (code) search tool for acme
golab – go local application builder – a web-based golang ide
tabby – Source code editor
godit – A microemacs-like text editor written in Go.
ViGo – A vim-like text editor.
Conception – Conception is an experimental research project, meant to become a modern IDE/Language package. demo video
Encodings and Character Sets
Mahonia – Character-set conversion library in Go
base58 – Human input-friendly base58 encoding
bencode-go – Encodeing and decoding the bencode format used by the BitTorrent peer-to-peer file sharing protocol
bsonrpc – BSON codec for net/rpc
chardet – Charset detection library ported from ICU
charmap – Character encodings in Go
go-charset – Conversion between character sets. Native Go.
go-simplejson – a Go package to interact with arbitrary JSON
go-xdr – Pure Go implementation of the data representation portion of the External Data Representation (XDR) standard protocol as specified in RFC 4506 (obsoletes RFC 1832 and RFC 1014).
gopack – Bit-packing for Go
gobson – BSON (de)serializer
iconv-go – iconv wrapper with Reader and Writer
mimemagic – Detect mime-types automatically based on file contents with no external dependencies
go-msgpack – Comprehensive MsgPack library for Go, with pack/unpack and net/rpc codec support (DEPRECATED in favor of codec )
codec-msgpack-binc High Performance and Feature-Rich Idiomatic Go Library providing encode/decode support for multiple binary serialization formats: msgpack and binc.
msgpack – Msgpack format implementation for Golang
msgpack-json – Command-line utilities to convert between msgpack and json
storable – Write perl storable data
TNetstring – tnetstrings (tagged Netstrings)
nnz – String and Int primitives that serialize to JSON and SQL null
magicmime — Mime-type detection with Go bindings for libmagic
Games
bloxorz – Solver for bloxorz basic levels
ChessBuddy – Play chess with Go, HTML5, WebSockets and random strangers!
Fergulator – An NES emulator, using SDL and OpenGL
Gongo – A program written in Go that plays Go
Ludo Game – Ludo Board game powered by Go on Appengine
godoku – Go Sudoku Solver – example of “share by communicating”
gospeccy – A ZX Spectrum 48k Emulator
Bampf – Arcade style game based on the Vu 3D engine.
GIS
go-gdal – Go bindings for GDAL
go-liblas – Go bindings for libLAS
go-proj-4 – An interface to the Cartographic Projections Library PROJ.4
gogeos – Go library for spatial data operations and geometric algorithms
lvd.go – dense set, byte trie, reed solomon encoding, wgs84 geodesics
polyline – Google Maps polyline encoding and decoding
geom – Open Geo Consortium-style geometries with native Go GeoJSON, WKB, and WKT encoding and decoding (work-in-progress)
Go Implementations
Express Go – Interpreted Go implementation for Windows
llgo – LLVM-based Go compiler, written in Go (work-in-progress)
Graphics and Audio
AnsiGo – Simple ANSi to PNG converter written in pure Go
Arclight – Arclight is a tool for rendering images
Go-OpenGL – Go bindings for OpenGL
GoGL – OpenGL binding generator
GoMacDraw – A mac implementation of go.wde
Goop – Audio synthesizer engine
Plotinum – An API for creating plots
Winhello – An example Windows GUI hello world application
allergro – basic wrapper for the Allegro library
allegro 5 – Go Bindings for Allegro 5 library
baukasten – A modular game library.
blend – Image processing library and rendering toolkit for Go.
bmp.go – package for encoding/decoding Windows BMP files
chart – Library to generate common chart (pie, bar, strip, scatter, hstogram) in different output formats.
draw2d – This package provide an API to draw 2d geometrical form on images. This library is largely inspired by postscript, cairo, HTML5 canvas.
freetype-go – a Go implementation of FreeType
gl – OpenGL bindings using glew
glfw – bindings to the multi-platform library for opening a window, creating an OpenGL context and managing input
glfw 3 – Go bindings for GLFW 3 library
glh – OpenGL helper functions to manage text, textures, framebuffers and more
glu – bindings to the OpenGL Utility Library
egl – egl bindings
es2 – es2 bindings
go-cairo – Go wrapper for the cairo graphics library
go-gd – Go bingings for GD
go-gnuplot – go bindings for GNUPlot
go-gtk3 – gtk3 bindings for go
go-heatmap – A toolkit for making heatmaps
go-openal – Experimental OpenAL bindings for Go
go-opencl – A go wrapper to the OpenCL heterogeneous parallel programming library
gocl – Go OpenCL (gocl) binding
go-opencv – Go bindings for OpenCV
go-taglib – Go wrapper for TagLib, an audio meta-data parser
go-tmx – A Go library that reads Tiled’s TMX files
go-vlc – Go bindings for libVLC
go.wde – A windowing/drawing/event interface
GoHM – H.265/HEVC HM Video Codec in Go
GoVisa – H265/HEVC Bitstream Analyzer in Go
goHorde – Go Bindings for the Horde3d Rendering engine.
gocairo – Golang wrapper for cairo graphics library
goexif – Retrieve EXIF metadata from image files
goray – Raytracer written in Go, based on Yafaray
gosc – Pure Go OSC (Open Sound Control) library
gosdl – Go wrapper for SDL
goxscr – Go rewrites of xscreensaver ports
gst – Go bindings for GStreamer
hgui – Gui toolkit based on http and gtk-webkit.
imaging – Package imaging provides basic image manipulation functions (resize, rotate, flip, crop, etc.) as well as simplified image loading and saving.
portaudio – A Go binding to PortAudio
pulsego – Go binding for PulseAudio
resize – Image resizing with different interpolations.
starfish – A simple Go graphics and user input library, built on SDL
svgo – a library for creating and outputting SVG
tga – TARGA image format encoding/decoding library
window – Optimized moving window for real-time data
wingo – A fully-featured window manager written in Go.
wxGo – Go Wrapper for the wxWidgets GUI
x-go-binding – bindings for the X windowing system
xgb – A fork of the x-go-binding featuring support for thread safety and all X extensions.
xgbutil – A utility library to make use of the X Go Binding easier. (Implements EWMH and ICCCM specs, key binding support, etc.)
vu – Virtual Universe. A skeleton 3D engine.
GUIs and Widget Toolkits
go-fltk – FLTK2 GUI toolkit bindings for Go
go-gtk – Bindings for GTK
go-qt5 – qt5 bindings for go
go.uik – A UI kit for Go, in Go. (project is closed)
GoQuick – Go and Qt Quick experimentation
gothic – Tcl/Tk Go bindings
gotk3 – Go bindings for GTK3, requires GTK version 3.8
go-webkit2 – Go bindings for the WebKitGTK+ v2 API (w/headless browser & JavaScript support)
Gowut – Gowut (Go Web UI Toolkit) is a full-featured, easy to use, platform independent Web UI Toolkit written in pure Go, no platform dependent native code is linked or called.
iup – Bindings for IUP
mdtwm – Tiling window manager for X
qml – QML support for the Go language
Hardware
go.hid – Provides communication with USB Human Interface Devices.
hwio – Hardware I/O library for SoC boards including BeagleBone Black and Raspberry Pi.
gortlsdr – A librtlsdr wrapper, which turns certain USB DVB-T dongles into a low-cost, general purpose software-defined radio receiver.
Language and Linguistics
alpinocorpus-go – A reader and a writer for Alpino corpora.
go-aspell – GNU Aspell spell checking library bindings for Go.
go-language – A simple language detector using letter frequency data.
go.stringmetrics – String distance metrics implemented in Go
inflect – Word inflection library (similar to Ruby ActiveSupport::Inflector). Singularize(), Pluralize(), Underscore() etc.
libtextcat – A Go wrapper for libtextcat.
textcat – N-gram based text categorization, with support for utf-8 and raw text
sego – Chinese language segmenter.
goling – String Similarity(Cosine Similarity, Levenshtein Distance), Spell Check, Segmentation
gobay – Naive Bayesian Classifier (Sentiment Analysis)
gocha – CHILDES data analyzing tool
gomata – Automata Theory, Computational Linguistics
Logging
glog – Leveled execution logs for Go
factorlog – Really fast, featureful logging infrastructure (supports colors, verbosity, and many formats)
seelog – Flexible dispatching, filtering, and formatting
timber – Configurable Logger for Go
log4go – Go logging package akin to log4j
syslog – With this package you can create your own syslog server with your own handlers for different kind of syslog messages
graylog-golang – graylog-golang is a full implementation for sending messages in GELF (Graylog Extended Log Format) from Google Go (Golang) to Graylog
rfw – Rotating file writer – a ‘logrotate’-aware file output for use with loggers
Machine Learning
bayesian – A naive bayes classifier.
go-galib – Genetic algorithms.
go-porterstemmer – An efficient native Go clean room implementation of the Porter Stemming algorithm.
paicehusk – Go implementation of the Paice/Husk Stemmer
snowball – Snowball stemmer
Mathematics
Cvx – Convex optimization package, port of CVXOPT python package
Units – Implements types, units, converter functions and some mathematics for some common physical types. lib
bayesian – Naive Bayesian Classification for Golang
blas – Go implementation of BLAS (Basic Linear Algebra Subprograms)
cartconvert – cartography functions for the Go programming language
dice – Dice rolling library
evaler – A simple floating point arithmetic expression evaluator
fixed – A fixed point (Q32.32 format) math library.
geom – 2d geometry.
go.mahalanobis – Naive implementation of the Mahalanobis distance using go.matrix
go-fftw – Go bindings for FFTW – The Fastest Fourier Transform in the West
go-fn – Special functions that would not fit in “math” pkg
go-gt – Graph theory algorithms
go-humanize – Formatting numbers for humans.
go-lm – Linear models in Go. Provides WLS and regression with t residuals via a cgo -> BLAS/LAPACK interface.
go-symexpr – Symbolic math as an AST with derivatives, simplification, and non-linear regression
go.matrix – a linear algebra package
gochipmunk – Go bindings to the Chipmunk Physics library.
gocomplex – a complex number library
godec – multi-precision decimal arithmetic
gographviz – Graphviz DOT language parser for golang
gomat – lightweight FAST matrix and vector math
gsl – GNU Scientific Library bindings
mathutil – Package mathutil provides utilities supplementing the standard ‘math’ and ‘rand’ packages.
mt19937_64 – Mersenne Twister int64 random source
polyclip.go – Go implementation of algorithm for Boolean operations on 2D polygons
pso-go – A library of PSO (Particle Swarm Optimization) for golang.
statistics – GNU GSL Statistics (GPLv3)
vector – A small vector lib.
Misc
GCSE – Go code search engine. source
CGRates – Rating system designed to be used in telecom carriers world
Go-PhysicsFS – Go bindings for the PhysicsFS archive-access abstraction library.
go.pipeline – Library that emulates Unix pipelines
GoFlow – Flow-based and dataflow programming library for Go
GoLCS – Sovle Longest Common Sequence problem in go
Gotgo – A Go preprocessor that provides an implementation of generics
Hranoprovod – Command-line calorie tracking
Tideland CGL Monitoring – Flexible monitoring of your application
atexit – Simple atexit library
bíogo – Basic bioinformatics functions for the Go language.
cpu – A Go package that reports processor topology
cron – A library for running jobs (funcs) on a cron-formatted schedule
dbus-go – D-Bus Go library
desktop – Open file/uri with default application (cross platform)
devboard – Kanban board application based on Simple-Khanban
dump – An utility that dumps Go variables, similar to PHP’s var_dump
env – Easily pull environment variables with defaults
epub – Bindings for libepub to read epub content.
faker – Generate fake data, names, text, addresses, etca
fsnotify – File system notifications for Go
functional – Functional programming library including a lazy list implementation and some of the most usual functions.
go-amiando – Wrapper for the Amiando event management API
go-bit – An efficient and comprehensive bitset implementation with utility bit functions.
go-business-creditcard – Validate/generate credit card checksums/names.
gochem – A computational chemistry/biochemistry library.
go-ean – A minimal utility library for validating EAN-8 and EAN-13 and calculating checksums.
go-eco – Functions for use in ecology
go-erx – Extended error reporting library
go-fann – Go bindings for FANN, library for artificial neural networks
go-idn – a project to bring IDN support to Go, feature compatible with libidn
go-metrics – Go port of Coda Hale’s Metrics library
go-osx-plist – CoreFoundation Property List support for Go
go-papi – Go interface to the PAPI performance API
go-pkg-mpd – A library to access the MPD music daemon
go-pkg-xmlx – Extension to the standard Go XML package. Maintains a node tree that allows forward/backwards browser and exposes some simpel single/multi-node search functions
go-qrand – Go client for quantum random bit generator service at random.irb.hr
go-semvar – Semantic versions (see http:/semver.org)
go-taskstats – Go interface for Linux taskstats
go-translate – Google Language Translate library
go-uuid – Universal Unique IDentifier generator and parser
go.dbus – Native Go library for D-Bus
go.pcsclite – Go wrapper for pcsc-lite
goNI488 – A Go wrapper around National Instruments NI488.2 General Purpose Interface Bus (GPIB) driver.
goPromise – Scheme-like delayed evaluation for Go
goST – A steam properties (steam table) library written for Go. This was designed as a native go equivalent to XSteam.
gocsv – Library for CSV parsing and emitting
goga – A genetic algorithm framework
gogobject – GObject-introspection based