2º #connect(dev)

I gave a little intro on Docker and talked about when to use it or not. No slides or video available.

Composition with Go

Composition goes beyond the mechanics of type embedding. It’s a paradigm we can leverage to design better APIs and to build larger programs from smaller parts. It all starts from the declaration and implementation of types that have a single purpose. Programs that are archi...

Go cross compilation

Note: This article extends Dave Cheney’s Go 1.5 cross compilers post. Cross compilers got easier with Go 1.5. You don’t have to bootstrap the standard library and toolchain as you used to do prior to 1.5. If cgo is not required The go tool won’t require any bootstrapping if...

Using Docker to Build Debian Packages (Codeship)

Parse environment variables to structs in Go

In Go, it’s dead simple to get the value from an environment variable: fmt.Println(os.Getenv("HOME")) But, sometimes you have default values… so you would have to do something like this: home := os.Getenv("HOME") if home == "" { home = "...

Organising Database Access in Go

A few weeks ago someone created a thread on Reddit asking: In the context of a web application what would you consider a Go best practice for accessing the database in (HTTP or other) handlers? The replies it got were a genuinely interesting mix. Some people advised usin...

Cheap MapReduce in Go

Here at Malwarebytes we have to deal with a huge amount of data generated by many different systems, malware research teams, telemetry, etc. That data can span for several Terabytes on a daily basis. We have been using Amazon’s Elastic MapReduce (EMR) in many different occ...

Singleton Pattern in Go

The Go Language growth has been phenomenal in the last few years, and is attracting language converts from all walks of life. There has been a lot articles recently about companies switching from Ruby, and experiencing the new world of Go and it’s parallel and concurrent ap...

Small Go Apps Containers

Or: how to ship your app in a <20Mb container. Well, as you may know, there is a good amount of people now building microservices in Go and deploying them as Docker containers. I do not yet have a lot of experience with Go and Docker, but I’ll try to share what I learned...

Supercharging the Atom Editor for Go Development

After years of using Integrated Development Environments (IDE) during my Windows progamming days, such as Visual Basic IDE, Borland Delphi IDE, Visual C++ and more recent Visual Studio, I have ditched all of those when I switched to Mac OS X about 10 years ago. My initial transi...