Systems blindness and how we deal with it

Parallelize your table-driven tests

With Go 1.7, testing package supports sub-tests that allows you to run multiple smaller tests from a test case. Each sub test is reported independently in the go test output. More information about these recent additions can be found at Marcel van Lohuizen’s recent talk fro...

Dealing with Maven dependency hell

Every now and then an active java-based project enters in a “dependency hell” state. That usually happens because people keep adding dependencies without checking what comes in transitively nor if that dependency is declared somewhere else already. It also seems to ha...

Using Instruments to profile Go programs

Apple has a suite of instrumentation and tracing tools for performance analysis available as a part of their Xcode tooling set. In this article, we will use Instruments to record and analyze the CPU profile of a Go program. Instruments also provide a large set of macOS-specific t...

SCS: A session manager for Go 1.7+

I’ve just released SCS, a session management package for Go 1.7+. Its design leverages Go’s new context package to automatically load and save session data via middleware. Importantly, it also provides the security features that you need when using server-side...

Bidirectional gRPC streaming for Go

Disclaimer: This article is not about a core Go package or tool but gRPC. gRPC provides support for implementing streaming endpoints as well as streaming support in their clients. Bidirectional streaming is useful if you want both server and client to be able to communicate to th...

Regular Expressions demystified

Regular Expressions are slow, ugly, error-prone, incomprehensible,… Or are they? Find out by learning regexp basics.

About

This blog aims to fill the gaps in knowledge transmission and provide useful everyday tips about the Go programming language, its packages and tools. I started this blog when she was working on the Go team at Google and an trying my best to keep it alive. About the author I work...

Apply transformations to Go code with eg

If you are willing to make large scale refactoring in your Go programs, automating the refactoring tasks is more desirable than manual editing. eg is a program that allows you to perform transformations based on template Go files. To install the tool, run the following: $ go get...

UUID without dependencies in Go

Today I saw that the size of my vendor/ folder in Golang project is around 150M. I am using glide there and there are 24 dependencies (it’s a program with multiple data storage connectors, notifications, etc.