Patterns for composable concurrent pipelines in Go

Contributed by   2015-02-26

Patterns for composable concurrent pipelines in Go The author of this post came into the world of Go Python, which is quite prevalent in the field of bioinformatics. In Python one can easily write composable lazy-evaluated pipelines of string processing operations using the generator syntax built into the language. The nice thing with generators is that they use less memory - but more even more importantly - constant amount of memory, which is very important when processing very large datasets that might not even fit in RAM.


GopherCon India 2015

Contributed by   2015-02-24

I came to GopherCon India not knowing what to expect, but from the moment I arrived it was nothing short of spectacular. I talked to amazing people who genuinely appreciated that members of the global community came to India to participate in the event. I think in their minds this legitimized the conference and gave them a sense of pride that India was important to the global Go community. The conference started with a one day workshop, where 25+ people had an opportunity to learn Go.


Go and the Secure Shell protocol

Contributed by   2015-01-13

What is the Secure Shell protocol? Many of us use ssh(1) everyday to administer servers around the world. The Secure Shell protocol, however, allows us to do much more than open secure shells. This post will attempt to the raise awareness of SSH and suggest various use cases for SSH in the modern web ecosystem. SSH is a transport layer security protocol that provides a secure method for data communication. On top of a single data channel, such as TCP, the SSH protocol provides us with: A secure handshake using four authentication methods, providing authenticity A two-way encrypted and verified data stream, providing privacy and integrity The ability to create many logical connections, providing a clean multiplexed connection abstraction Connection metadata “request” channels, terminal management and remote program execution What about TLS?


The world's first Go distributed hackathon.

Contributed by   2015-01-03

Registration is now open for the Gopher Gala - the world’s first Go distributed hackathon. You may have heard of the Rails Rumble, Node Knockout, or Django Dash. Now, Go has its own distributed hackathon: the Gopher Gala. The Gopher Gala invites people to write a meaningful standalone application using Go over the course of a weekend. It is an online, virtual competition, and participants compete from all over the world.


Cron as a file system

Contributed by   2014-12-29

9p I read The Styx Architecture for Distributed Systems over a decade ago. The central idea of the paper is that “representing a computing resource as a form of file system, [makes] many of the difficulties of making that resource available across the network disappear”. By resource they mean any resource. For example in the Plan9 window system 8½, windows and even the mouse are implemented as a files; similarly, in Inferno and Plan9 the interface to the TCP/IP network is presented as a file system hierarchy.


The Other Side of Go: Programming Pictures, the Read, Parse, Draw Pattern

Contributed by   2014-12-25

The other side of Go: Programming Pictures, the Read, Parse, Draw Pattern Go has proven to be extremely versatile and well suited to back-end tasks, but sometimes you need a picture, and I’ve found that Go works well for generating visuals as well. This post will explore one method for generating pictures (specifically vector graphics) from data using the SVGo package. The SVGo package API performs a single function: generate standard SVG to an io.Writer.


Type safe templating with ego

Contributed by   2014-12-24

Go has seen many converts from scripting languages such as Ruby and Python. These newcomers love the type safety, the language simplicity, and the static binaries that Go offers. Unfortunately, these features are lost once developers dive into the built-in templating libraries: text/template & html/template. We’ll look at ego – a type safe templating language – that preserves all these features and lets you write your templates in your favorite language: Go!


Viper: Configuration with Fangs

Contributed by   2014-12-23

One of the hardest things to get right when building command line or server applications is user configuration. One look at the many different INI formats or various approaches used in /etc demonstrates that there really isn’t a good and standard approach. With modern applications being used in so many different environments from the dev environment to docker containers to cloud infrastructures it’s never been harder to provide a consistent and appropriate solution to configuration.


Testing Microservices in Go

Contributed by   2014-12-22

This post is about testing microservices and why they should be tested differently from many types of software. Microservices are by their very nature simple and encapsulated behind their api. This means two things: As long as we don’t break the http interface, there is no way to introduce regressions. Updates to the implementation of an endpoint are usually going to be close enough to a rewrite that tests will need to be rewritten too.


Managing Dependencies

Contributed by   2014-12-21

Packages, dependencies, versions. This post will explore two tools and how I’ve been using them. Godep as the consumer of third-party packages, and as a library author. go get Before using these tools, get comfortable with the fundamentals of GOPATH and go get. At first I found GitHub’s forking mechanism at odds with the go tool. It took a shift in perspective – a slightly different approach to how I was using git.


Cobra: A Modern & Refined CLI Commander

Contributed by   2014-12-20

Go is the perfect language to develop command line applications. Go has a few advantages that really set it apart from other languages: Single binary Very fast execution time, no interpreter needed Go is awesome! Cross platform support Command line based applications are nearly as old as computing itself but this doesn’t mean that they haven’t evolved. Traditional cli applications used flags to manage the different behaviors an application could perform.


Simple backoff

Contributed by   2014-12-19

Or, taming connection state and thundering herds. There comes a time in the life of many programs when you need to maintain a persistent connection to a server. When that server goes down (as it will), you’ll need to reconnect. A reconnect loop needs to do two things: to increase the wait time between attempts after repeated failures (i.e. backoff); and to randomize wait times to avoid the thundering herd problem.


Atlas: Building with Rails and Go Microservices

Contributed by   2014-12-18

Atlas is a recently announced service by HashiCorp that provides a single platform to take an application from development through to production. The complexity of the problem makes Atlas a sophisticated web service that is composed of many moving pieces. This article covers the design of Atlas, and specifically the use case of pairing a front-end Rails application with a collection of Go microservices in the backend. Background At HashiCorp, we are big fans of Go.


Soy - Programmable templates for Go, Java, JS

Contributed by   2014-12-17

Closure Templates (aka Soy Templates) is a client and server-side templating language developed at Google. The Go implementation exposes the the internal structure of the template (the AST). This article highlights a couple of interesting applications where we’ve benefited from being able to programmatically inspect and modify this structure. Background Earlier this year, we developed a system for publishing a web site based on information in our CMS (content management system).


Wrapping Git in rc shell

Contributed by   2014-12-16

Wrapping Git in rc shell Introduction When Rob Pike announced the migration of Go from Mercurial and Rietveld to Git and Gerrit, like most people, I was pretty enthusiastic. After all, with the increasing number of contributors and development branches, this sounded like a logical evolution. However, as a maintainer of the Plan 9 port of Go, I felt worried, because Git doesn’t work natively on Plan 9, yet. Plan 9 is a distributed operating system built at Bell Labs in the late 80’s.


The Case Against Third Party Libraries

Contributed by   2014-12-15

Or how I learned to stop worrying and love versionless package management If you spend any time on the golang-nuts mailing list you’ll learn that the only thing more contentious than generics is package management. When I first started writing Go I saw the lack of a “real” package manager as a glaring oversight but the more I write Go the more I appreciate the simplicity of go get. It’s easy to think of the benefits of versioned packages.


Using a JSON File as a Database Safely in Go

Contributed by   2014-12-14

There are definitely problems with using a json file as a database, but sometimes the simplicity of no extra dependencies makes it an attractive option. The two biggest problems are performance and managing concurrent reads and writes. We can’t do much about performance, but with Go, managing concurrent reads and writes is a breeze! Below is a walk through of a method for managing file access so that a json file can safely be used as a database.


Probabilistic Data Structures for Go: Bloom Filters

Contributed by   2014-12-13

In part one, I talked about some interesting probabilistic data structures.. In part two, I will discuss a more common approximate data structure: Bloom filters and their variations. Bloom filters A set is a collection of things. You can add things to the set, and you can query the set to see if an element has been added. (We’ll ignore deleting elements from the set for now.) In Go, we might use a map[string]struct{} or map[string]bool to represent a set.


goquery: a little like that j-thing

Contributed by   2014-12-12

A little over 2 and a half years ago I started playing with that new language called Go. Coming mostly from .NET and node.js, I was at first intrigued by its concurrency features and its lack of object inheritance, and impressed by the quality of the team behind it. Fast-forward to today and Go is now my go-to (oh please), day-to-day language, and I’m lucky enough to use it both at work at splice and in my personal projects.


Writing file systems in Go with FUSE

Contributed by   2014-12-11

Motivation Some time ago, I decided I wanted to solve my own storage needs better, and I realized that I can’t just rely on synchronizing files. I needed a filesystem that combines the best of three worlds: local files, network file systems, and file synchronization. This project is called Bazil, as in bazillion bytes. To make Bazil possible, I needed to be able to easily write a filesystem in Go. And now you can, too, with


Easy Docker Deployment with Hooks and Captain Hook

Contributed by   2014-12-10

Deploying with “git push” the Docker Way Many people have asked me how we set up the GopherAcademy blog to automatically deploy when we push a commit. In this Go Advent 2014 article I’m going to walk through the process so you can see what is involved and decide if it’s right for your setup. Why Deployment can be the hardest part of any project. Docker certainly makes that step easier but the ecosystem is still young, and if you want a smooth workflow you’ve got to patch a few things together yourself.


Patchwork Toolkit - Lightweight Platform for the Network of Things

Contributed by   2014-12-09

Patchwork is a toolkit for connecting various devices into a network of things or, in a more broad case - Internet of Things (IoT). A tl;dr picture describing the idea behind it is shown below. Considering you as a hacker/hobbyist, the Patchwork toolkit can be expressed as follows: you take your favourite electronics (bunch of sensors, LED strip, robot-toys, etc), connect them to a pocket-size Linux box, install Patchwork, and after some quick configuration you get RESTful APIs, MQTT data streams, directory of your devices and services, their discovery on the LAN with DNS-SD/Bonjour, and a damn-sexy, open source real-time dashboard based on Freeboard.


Nigel's WebDAV package

Contributed by   2014-12-08

Nigel Tao and Nick Cooper have been working on a new WebDAV package for the repository. The package is still in its formative stages, so this isn’t a review of the package itself. Instead what I want to discuss is the design of one of the package’s types, and how it made me re-evaluate some of my ideas about Go package design. The Handler type The central type in the WebDAV package is the Handler, which I’ve reproduced below type Handler struct { // FileSystem is the virtual file system.


Reading config files the Go way

Contributed by   2014-12-07

In the middle of writing my blog engine dynocator, I wondered about the best possible way to read data from a config file. My first approach was to read line by line from the file and use the wonderful strings package to parse the data I want. Another approach revolved around using regexp to seek out the info from the file. But these approaches were both very hacky and involved dealing with a lot of string operations, which I’m not a big fan of.


Macaron: Martini-style, but faster and cheaper

Contributed by   2014-12-06

Macaron is a high productive and modular design web framework in Go. It takes basic ideology of Martini and extends in advance. Why another web framework? The story began with the Gogs project, it first uses Martini as its web framework, worked quite well. Soon after, our team found that Martini is good but too minimal, also too many reflections that cause performance issue. Finally, I came up an idea that why don’t we just integrate most frequently used middlewares as interfaces(huge reduction for reflection), and replace default router layer with faster one.


String Matching

Contributed by   2014-12-05

How do you search for a string? If it’s just once, strings.Index(text, pattern) is probably your best option. The standard library currently uses Rabin-Karp to search the text for the pattern. However, there are lots of different cases for string searching, each of which has its own set of “best” algorithms. Fortunately for us, many of them already have implementations in Go. index/suffixarray What if you had a single text you wanted to do lots of searches through for different patterns?


Git2go inception

Contributed by   2014-12-04

How many levels of inception we need to master git? This tutorial that explains how to use git2go to publish an article for the Go Advent 2014. Git2go implements go bindings for libgit2, a pure C implementation of the Git core methods. This is important because, unlike other libraries, libgit2 doesn’t talk with any git binary. You won’t find the installation complicated if you’ve worked already with other C libraries. I recommend you to read the installation section in the readme.


Delve: Go debugger

Contributed by   2014-12-03

Delve Delve is a Go debugger. Currently the project is in beta, with most of the functionality implemented, and various improvements and platform support on the way. Why I started work on Delve sometime shortly after Gophercon 2014. Delve began as a fun and interesting project to hack on, and has since become a useful tool with a lot of potential. Delve was created to address issues with debugging Go programs with GDB.


Handwritten Parsers & Lexers in Go

Contributed by   2014-12-02

Handwritten Parsers & Lexers in Go In these days of web apps and REST APIs it seems that writing parsers is a dying art. You may think parsers are a complex undertaking only reserved for programming language designers but I’d like to dispel this idea. Over the past few years I’ve written parsers for JSON, CSS3, and database query languages and the more that I write parsers the more that I love them.


Probabilistic Data Structures for Go

Contributed by   2014-12-01

Imagine you had access logs for a very high traffic website. How would you determine how many different IP addresses accessed your site? Or how many hits from a particular IP? Or which ones accessed it the most? Assuming IPv4 addresses, you could use a map[uint32]int to maintain the counts, but that could end up using a lot of memory. It’s certainly possible to have a map with 4 billion entries, and a real log server wouldn’t have accesses from every single valid IP address, but the problem still exists.


Using Go for Anomaly Detection

Contributed by   2014-11-29

As engineers, we need to know how our applications and services are performing in realtime and isolate any problems as quickly as possible. While there is a plethora of tools to collect, store and graph metrics from infrastructure, there are fewer tools for performing analysis on these metrics. Anomaly detection, currently a hot topic in web operations circles, is concerned with automated detection of anomalous circumstances which could indicate a problem.


Go at Sourcegraph - Serving Terabytes of Git Data, Tracing App Performance, and Caching HTTP Resources

Contributed by   2014-11-28

Sourcegraph is a code search and review application that supports and analyzes code in multiple languages: Go, Python, Java, Ruby, JavaScript, and soon more. Even though we have experts in each language on our team, Sourcegraph’s core has been written in Go since day one, and we’ve chosen Go for each new project and system we’ve built. We’ll run through all of the major open-source systems and projects we’ve built within Sourcegraph in Go.


Go at Datadog

Contributed by   2014-11-27

Go at Datadog In the last year, Go has started to supplant parts of our intake pipeline at Datadog that were previously written in Python. The embrace of Go by users of dynamic languages is well documented, generally focusing on the performance and memory usage benefits of switching to a compiled language that lacks heavy per-object overhead. We could tell the same story. Datadog is a SaaS cloud monitoring and metrics platform, and because of an increasing focus on horizontal scaling in the cloud, our users have lots of servers, and their servers send us lots of data.


Advanced Reflection with Go at HashiCorp

Contributed by   2014-11-26

Advanced Reflection with Go at HashiCorp HashiCorp builds a diverse set of popular DevOps tools written in Go: Packer, Serf, Consul, and Terraform. While these tools range from desktop software to highly scalable distributed systems, their internals all have one thing in common: they use reflection, and a lot of it. In this post, I’ll share the libraries and techniques we use at HashiCorp to get the most out of reflection, all while being safe and efficient.


Go at CoreOS

Contributed by   2014-11-25

Go at CoreOS When we launched the CoreOS project we knew from the very beginning that everything we built would be written in Go. This was not to make a fashion statement, but rather Go happened to be the perfect platform for reaching our goals – to build products that make distributed computing as easy as installing a Linux distro. It’s been almost 10 years since a new Linux distro hit the scene, and during that time Python was the language of choice.


How Go Helped Shape Splice's engineering culture

Contributed by   2014-11-24

Go is a trendy programming language, but let’s be honest: the Go language doesn’t have anything new that wasn’t first implemented somewhere else. As a matter of fact, Go is a pretty boring programming language. Why would anyone pay attention to a typed compiled language that doesn’t have generics, doesn’t let you do metaprogramming, doesn’t support inheritance and, as some said, feels like we are taken back to the 70s? Why not just write C?


Kite: Library for writing distributed microservices

Contributed by   2014-11-23

Writing web services with Go is super easy. The simple but powerful net/http package lets you write performant web services in a very quick way. However sometimes all you want is to write a RPC backend application. Basically you want to have many independent worker applications that are running separately, each with their own responsibility of doing certain tasks. They should accept requests and reply to them with a well defined response.


OpenShift 3 and Go: Teaching Old Dogs New Tricks

Contributed by   2014-11-22

The first commit to OpenShift (the Platform as a Service that is so hipster that we were doing containers even before it was cool) was four years ago. From day one it’s been about making a platform that helps developers and operations move their applications into a cloudy future with the tools and technologies that they are already familiar with. As developers, we love working on brand new things: things written in the newest languages, the hottest stacks, and the trendiest databases.



Contributed by   2014-11-21

When I decided to build Inspeqtor (source), I had a fundamental choice: what language should I build it in? I’ve worked in Ruby for the last 8 years so it was a natural choice: “use the tool you know best” is never a bad choice when solving your own problem. However I’m not building something for myself: I’m building a product that will be used by thousands of others. Since Inspeqtor is an infrastructure monitoring tool, it needs to run 24⁄7 efficiently and reliably.


Gogs: GitLab alternative in Go

Contributed by   2014-11-20

What is Gogs and why we make it? Gogs is a painless self-hosted Git Service written in Go. It aims to make the easiest, fastest and most painless way to set up a self-hosted Git service. With Go, this can be done in independent binary distribution across ALL platforms that Go supports, including Linux, Mac OS X, and Windows. Why we choose Go? As a strong type and compiled system programming language, Go has significant ability to catch errors at compile time to reduce possibility of runtime errors, and it is extremely useful when we want to make changes in the project.


Updating your Go packages with Go Package Store

Contributed by   2014-11-19

Go Package Store is an app that displays updates for the Go packages in your GOPATH. Why another way to update Go packages when you can already just do go get -u, you might think. In true Go tradition, Go Package Store doesn’t try to replace what already exists. Instead, it uses composition to augment it. In the end, Go Package Store simply uses the os/exec package to execute go get -u for you (which is why it’s safe to run).


Building Street Address Autocomplete with Go

Contributed by   2014-11-18

Almost two years ago, SmartyStreets began an exodus from the .NET platform. What would take its place? Go. Before moving our entire code base from .NET to a language none of us knew, we decided to write a completely new product in Go: a service to help users enter their addresses while they’re still typing. We had 3 months. Since there are over 300,000,000 addresses designated by the USPS, our first challenge was to figure out how to serve up relevant data to a user based both on their location and what they had already typed.


Going fast at startups

Contributed by   2014-11-17

FullStory is a tool for understanding website visitors in a whole new way. An in-page script captures everything that happens during a user’s online session, including the entire DOM and every mutation. Through this novel approach, you can reconstruct and play back every session in high fidelity. Since we are capturing directly at the DOM level, this also allows us to make interactions and page elements super searchable and analyzable. Our previous product was built as a single, monolithic Java app.


Bleve: Text Search Powered by Go

Contributed by   2014-11-16

Bleve, a text indexing and search library for Go, is excited to be part of the celebration of the 5th birthday of Go. Building a complete solution for indexing and search text requires integrating many different technologies. Go, the language, the standard library, the whole ecosystem, combine to make this not only possible, but fun.


How Continuum ended up being written in Go

Contributed by   2014-11-15

In March of 2012, I had just left VMware and the project I had founded, architected and built, Cloud Foundry. PaaS then was still very new, as was a distributed system built in Ruby. Many Go advocates these days come from the Ruby world, which was a surprise to Go authors who believed many would come from C or C++ worlds. Go was built inside of Google from an amazing cast of authors who were looking to solve problems with the current build and link process for large C++ applications.


Using Go in government

Contributed by   2014-11-14

When the UK Government Digital Service (GDS) started working on GOV.UK, much of it was built in Ruby. Since then, we’ve used a number of different programming languages across government including Java, Clojure, Scala, Python and Javascript. More recently, we’ve turned to Go for some projects. This is a brief experience report. It’s about how we’ve used Go and what we feel would be useful to know for others considering it.


To be Concurrent or Not to be? Sometimes Both

Contributed by   2014-11-13

Go really makes concurrency easy. That said, there’s still some things to watch out for and not every 3rd party package you find out there is ready to have “go” put in front of its functions. Likewise, it’s important to know when you actually need concurrency. Just because Go makes concurrency easy doesn’t mean we always need to use it. Sometimes our applications only have small needs for it. Fortunately with Go, it’s not an all or nothing type situation.


Why InfluxDB is written in Go

Contributed by   2014-11-12

InfluxDB is an open source time series database written in Go. One of the important distinctions between Influx and some other time series solutions is that it doesn’t require any other software to install and run. This is one of the many wins that Influx gets from choosing Go as its implementation language. While the first commit to InfluxDB was just over a year ago, our decision to use Go can be traced back to November 2012.


Kubernetes + Go = Crazy Delicious

Contributed by   2014-11-11

What is Kubernetes? And what kind of name is that? Kubernetes is a container cluster management system. Modeled after Google’s internal systems, Kubernetes (or k8s for short) allows users to schedule the running of Docker containers over a cluster of machines. It is a toolset for starting, tracking and finding what work you have running and where it is running. In fact, Kubernetes has been off to such a great start, we’ve created an official Google Cloud Platform product powered by Kubernetes: Google Container Engine.


Introducing the Go Birthday Bash 2014

Contributed by   2014-11-10

The Go Birthday Bash Today is a special day for Go enthusiasts across the globe. We’re celebrating the 5th birthday of a programming language, and perhaps just as importantly: a community. From the beginning, many knew Go was special. With a heritage befitting nobility, it was clear that Go was intended for big things. This month we are celebrating Go by inviting guests to post articles about how Go has made a difference in their business, in their projects, and even in their lives.


Welcome to the new Gopher Academy Blog

Contributed by   2014-11-07

Welcome Gopher Academy is focused on bringing Gophers together. Our yearly conference GopherCon is a great example of our commitment to building a strong and inclusive community around the Go programming language. As we examined our portfolio, though, it became clear that our blog platform needed some modernization. We didn’t have to look hard to find hugo, a fast and flexible static site generator written in Go. It Takes A Village As we pondered the move to a new blog platform, the thought of all that work was overwhelming.


Automatically Deploy A Revel Web Application

Contributed by   2014-07-09

Introduction The websites that power GopherAcademy and GopherCon are written using Revel, which is a very nice framework for building web applications. Go has a great built-in HTTP server, but there are times when you don’t want to roll-your-own web framework. Revel is great if you’re looking for a batteries-included approach to web development in Go. I come from a Ruby and Rails background, and one of my favorite parts of the Rails ecosystem is Capistrano.


Join Our New Slack Community For Gophers

Contributed by   2014-05-12

Why Are We Doing This? GopherCon was an amazing experience for many of us who had the privilege to go. We met so many great people. Some for the first time and many who we had relationships with on social sites such as Twitter and G+. On my last night in Denver I started to feel sad. I didn’t want to lose that camaraderie I had made with these friends. I just kept thinking, how could this be sustained?


GopherCon 2014 Retrospective(Denver, Colorado - 2014)

Contributed by   2014-05-02

It’s a Wrap Gophercon 2014 is in the books. In the end, we had 700 attendees, and it looks to us like everyone enjoyed the experience. Putting on a conference is really hard work, but once the date arrived everything seemed to come together well. It was really gratifying for us to see so many Go enthusiasts at the event, and I think the best part of the conference was getting to meet all the great people in the Go community that I’ve been interacting with for the past four years.


Gogs: Binary Deployment: The Right Way to Deploy

Contributed by   2014-04-01

Gogs: When you’re deploying a binary, you’re doing it Right. This post is published corresponding to the Gogs - Go Git Service v0.2.0 release. First, please let me speak for the develop team to thank all of our friends who are supporting us on GitHub. As you may know, v0.2.0 is the first public release of Gogs, and the community has contributed over 650 stars to this project on GitHub in just one week.


Go development environment for Vim

Contributed by   2014-03-29

Go development environment for Vim The reason for creating vim-go Go has a very versatile toolchain and commands that makes Go programming fun. One of the famous tools is gofmt, which automatically reformats the code according to some predefined rules. However there are many other tools like goimports, oracle, godef, etc.. which help to provide a more productive workflow. There are many independent vim plugins that integrate these tools into Vim.


Plumbing and Semantics: Communication Patterns in Distributed System

Contributed by   2014-02-06

Introduction In distributed systems, multiple components running on different machines—physical or virtual—communicate and coordinate to accomplish tasks. Distributed systems building typically focuses on the way components communicate. As things change (e.g. infrastructure, configuration, components), pressures arise and must be accommodated. Most of you have heard of loose coupling, which asserts that communications between components should be as flexible and adaptive as possible. Why is this a design goal? The more rigidly a system is coupled together, the more likely it’ll break down and fail to adapt to change.


Moving to Go: A Pragmatic Guide

Contributed by   2014-01-27

Moving to Go You’ve read all the blog posts about how great Go is. You’ve lost patience with your monolithic framework of choice—Ruby on Rails, Django, etc. You’re ready to take the leap and switch to Go. Well, what now? That’s exactly the position we find ourselves in at DramaFever. Our site is built on Django, and it just isn’t scaling to keep up with our rapidly growing traffic. We had read great things about Go, and some of our engineers are big proponents of the language (Dan Worth runs the Go Philly meetup), so we decided to take the plunge and start migrating things to Go.


GopherCon 2014 Scholarship for Women

Contributed by   2014-01-15

Announcing the GopherCon Scholarship Program Today I’d like to announce the GopherCon Scholarship Program. It’s goal is to increase the visibility of women in the Go community through the most direct path I can imagine: sponsoring their attendance to GopherCon 2014. I’ve purchased the first ticket for GopherCon Scholarship out of my own pocket. I need to come up with a way to award it to a deserving Go community member who wants to attend GopherCon.


Writing a Distributed Systems Library in Go

Contributed by   2014-01-06

Writing a Distributed Systems Library in Go Introduction In early 2013, I needed to add distributed processing and storage to my open source behavioral analytics database. To my surprise, there were almost no libraries for distributing data. Tools like doozerd were great for building systems on top of but I didn’t want my database to depend on a third party server. As I began to read distributed systems research papers I began to understand why there were not many libraries available.


Go Advent Day 25 - Announcing GopherCon 2014 Speakers

Contributed by   2013-12-25

Go Advent This posting brings to a close the Go Advent series that started on December 1st. We’ve had some amazing posts from all around the Go community. We can’t thank our authors and contributors enough for the time and effort they expended creating and editing the articles. We hope everyone agrees that this is a tradition worth keeping! GopherCon 2014 GopherCon 2014 will be held in Denver, Colorado, USA on April 24th through April 26th, 2014 at the Marriot Denver City Center.


Go Advent Day 24.5 - Thank you

Contributed by   2013-12-24

Thank you So far this year’s Go Advent has generated over 60k unique page views and exists as a permanent resource for the future. In this penultimate post we’d like to recap the contributions by our fantastic authors. Day 1 kicked off Go Advent in great style with the announcement of the Go 1.2 release by Andrew Gerrand. Day 2 arrived shortly after bringing news that once again the Go team had pulled another rabbit from their performance hat.


Go Advent Day 24 - Channel Buffering Patterns

Contributed by   2013-12-24

Introduction One common method for message processing in Go is to receive from an input channel and write to an output channel, often using intermediate channels for message transformation and filtering. Multiple goroutines may perform these functions concurrently and independently, making for code that is easily parallelized and tested. Message buffering is one kind of transformation that is sometimes useful in these systems. Some programs don’t need to process each message immediately, and can more efficiently process several messages at once.


Go Advent Day 23 - Multi-Platform Applications: Architecture and Cross-Compilation

Contributed by   2013-12-23

Introduction While Go is touted for its utility on the server side and in networked environments, Go is incredibly powerful as a client-side (desktop) application language as well. An often unknown feature of Go is that it is more or less completely portable: you can compile your Go code to run on any other operating system Go supports from the comfort of your own operating system. In addition to this, Go has build constraints to control which files are compiled under what conditions, allowing you to write OS-specific code and still have your application compile.


Go Advent Stocking Stuffer Bonus - Ginkgo and Gomega: BDD-Style Testing For Go

Contributed by   2013-12-23

Ginkgo and Gomega: BDD-Style Testing For Go Agile software development is all about discipline, and disciplined agile developers test-drive their code: with a comprehensive test suite, refactoring and adding new features becomes substantially less stressful and time-consuming. Moreover, a well-groomed, lovingly maintained test suite can eloquently describe a codebase’s behavior; thus the test suite becomes a living source of documentation making it easier for developers to communicate intent with one-another. Testing in Go In Go, of course, testing is a first-class citizen.


Go Advent Day 22 - A Journey Into NSQ

Contributed by   2013-12-22

Introduction (NSQ is a realtime distributed messaging platform. It’s designed to serve as the backbone of a modern infrastructure composed of loosely connected services running on many computers. This post describes the internal architecture of NSQ with an emphasis on Go, focusing on performance optimization, stability, and robustness for high throughput network servers. Arguably NSQ would not exist if it were not for the timing of our adoption of Go at bitly.


Go Advent Day 21 - Two Factor Authentication in Go

Contributed by   2013-12-21

Introduction Every day we hear about another site getting hacked and more passwords being leaked. Bad passwords and password reuse are two of the biggest problems with the human side of computer security. Two-factor Authentication (2FA) is an attempt to improve things. Passwords alone are “something you know”, and if the database is compromised then somebody else can know it too. This is why password reuse is a problem. With 2FA, passwords are augmented with “something you have”.


Go Advent Day 20 - Go in Academia: Emulating Wireless Networks

Contributed by   2013-12-20

How I Came to This TL;DR; — We didn’t want to use simulators and using real device for experiments became infeasible, so I decided to build an emulator for 802.11-like networks. The first version was in C++ and it didn’t work well. I rewrote the simulator in Go and it gives twice throughput than C++ version and that’s what we are using now. I am in a wireless networking research group in Auburn University.


Go Advent Day 19 - Eject the Web

Contributed by   2013-12-19

Editors Note: Yasuhiro is not a native English speaker, so during the editing of this post is was necessary to make some minor corrections. We felt that it was very important however, that the Author’s original phrasing and intent be preserved as much as possible. Introduction As you already know, Go is a good programming language to write web applications. There are already many packages providing routers, MVC, and Sinatra-like frameworks.


Go Advent Day 18 - Go Outside

Contributed by   2013-12-18

Introduction Outside is a Go package to dynamically link to and execute functions in Windows Dynamic Link Libraries and Linux Shared Libraries. Its current status is ‘prerelease’ with only 32-bit register size implemented and tested so far. Also, some functionality is very experimental and will probably change a lot before release 0.1. I only came to explore Go as a viable general purpose or glue language in the 2nd quarter of 2013.


Go Advent Day 17 - Pond: a New RSS+Atom Syncing Protocol

Contributed by   2013-12-17

The Problem We’re standing on the verge of a new era of data ownership and privacy, with decentralization and cryptography taking center stage on the technical side of things. The series of events that led us to this point has been taking place since long before our suspicions about governments and corporations invading our privacy were confirmed. In the past decade major players in the “cloud” industry have emerged, and most users trust them–or used to trust them–blindly with their information.


Go Advent Day 16 - Coconut: a pure Go blogging engine

Contributed by   2013-12-16

Quickstart Coconut is a simple blogging engine. It has two kinds of content: Articles and Pages. Articles are stored in the articles directory and can be requested by using their file name (minus the required “.md” file ext) as the first and only part of the path. Pages have their url and file paths specified in the config file. All page file paths are relative to the static directory, but this will probably change.


Go Advent Day 15 - Accelerating ecommerce with Go

Contributed by   2013-12-15

Welcome Writing an ecommerce site in Go Go adoption in the enterprise is increasing since the 1.0 release. Large respected tech companies have been using Go to build interesting back end services like etcd, specialized content delivery systems like, and mobile optimization services like Moovweb., a boutique quality daily deal site for children and women, was preparing to launch its new retail site, with the goal of engaging customers in a Pinterest-like product presentation.


Go Advent Day 14 - gobrew

Contributed by   2013-12-14

What is gobrew? Simply put, gobrew lets you easily switch between multiple versions of go. It is based on rbenv and pyenv. Why gobrew? Often times you’ll be developing against one version of Go when another version is released (or perhaps a release candidate is made available). Instead of fighting to manage multiple versions and changing your $PATH repeatedly, you can use one simple tool to manage your installations of Go.


Go Advent Day 13 - Go web services with Tiger Tonic

Contributed by   2013-12-13

Welcome Go is unique among mainstream programming languages in that its standard library web server is not a complete afterthought. The Go language is well-suited for engineering complex networked services and Go’s standard library recognizes that many (if not most) of those services communicate via HTTP. Sprinkle some Google scale on it and your web applications and services can really hit the ground running. The standard library sets the tone but it’s far from the end of the story of how to effectively build web services in Go.


Go Advent Day 12 - Inside the Go Playground

Contributed by   2013-12-12

From-the-state’s-secret-department Today’s post comes to us from the Go team’s own Andrew Gerrand. Reporting from deep inside an undisclosed location, Andrew lifts the lid on one of Go’s greatest mysteries: how does the Go Playground work?. Read all about it, and you too can learn the signficance of 11pm on the 10th of November 2009.


Go Advent Day 11 - Build a Christmas List with Martini

Contributed by   2013-12-11

Introduction Martini is a Go package for web server development that has gained quite a bit of popularity over the last month. Martini was written to help make web development in Go a convenient, expressive, and DRY (pun intended) process. As of this writing Martini has 161 watchers, 2316 Stars, and 153 Forks on Github. There is a ton of weekly activity around both the martini and martini-contrib repositories. If you haven’t already be sure to check out the Video Demo.


Go Advent Day 10 - Beyond Static Binaries

Contributed by   2013-12-10

Introduction Today we’re going to go against the general theme of the Go Advent Calendar and introduce No New Hotness™. That’s because today is all about why folks in IT operations <3 go. Fortunately, we’ve had a couple teasers of the ops perspective with discussions on environment variable configs and service discovery. Get in Touch with Your Inner Sysadmin Since you may not be a natural born sysadmin, let’s try and get you in the mood.


Go Advent Day 9 - Building A Weather App In Go

Contributed by   2013-12-09

Introduction At Ardan Studios we have spent the last 6 months, in our spare time and on weekends, building a consumer based mobile application called OutCast. The mobile application is tailored towards those who like spending time outdoors, whether that be fishing, hunting or any other type of activity. The Main Weather and Buoy Screens This first release of OutCast shows the conditions for the buoy stations and marine forecasts areas within the United States.


Go Advent Day 8 - Doctor Who and the mutant Go compilers

Contributed by   2013-12-08

At the end of 1963 the UK was in the grip of Beatlemania, but for an impressionable 7-year old like me, it was the arrival of Doctor Who that really fired my imagination. The highlight of my week was peeping out from behind the furniture in our living-room on a Saturday evening, alternately terrified and transfixed by the exciting new program on our small black-and-white television set. During the rest of the week, my friends and I would play “Daleks”.


Go Advent Day 7 - A Router for GOV.UK

Contributed by   2013-12-07

Introduction When we set out to build GOV.UK, the new home for UK Government information and services, we decided up front that we wanted an architecture that would allow us to build very focussed applications that did one thing well. We didn’t have a clear idea of how our product or our teams would develop and we wanted to keep our options open. And we wanted to encourage a culture of experimentation where people could easily plug in whichever HTTP-fluent tool helped them most effectively meet whichever user need they were working on.


Go Advent Day 6 - Service Discovery with etcd

Contributed by   2013-12-06

Introduction At Poptip, our first foray into Go was a small but critical service that required extremely high throughput for a non-trivial amount of text processing. Skeptical at first, I remember having a conversation with a friend who was raving about how much he had been enjoying Go, and noticed that some other very smart people had chosen to bet their entire companies on the language. After writing a few benchmarks, we were very happy with the results and confident to move forward with the project.


Go Advent Day 5 - An introduction to beego

Contributed by   2013-12-05

An introduction to beego Beego is an open-source, high-performance and lightweight application framework for the Go programming language. It supports a RESTful router, MVC design, session, cache intelligent routing, thread-safe map and many more features that you can check out here. This post will give you an overview and get you started with the beego framework. Overview The goal of beego is to help you build and develop Go applications effectively in the Go way.


Go Advent Day 4 - GoConvey

Contributed by   2013-12-04

Introduction One highly appealing aspect about Go is built-in testing with go test. From one who once eschewed test-driven development, I now wholly encourage it. Testing is fundamental to writing Go code, and Go 1.2’s new test coverage tools make TDD more compelling than ever. Introducing GoConvey GoConvey is a new project that makes testing even better in Go. It consists of (1) a framework for writing behavioral-style tests, and (2) a web UI which reports test results in real-time.


Go Advent Day 3 - Building a Twelve Factor App in Go

Contributed by   2013-12-03

Introduction I’ve been writing a lot of Go code lately, but only recently discovered the Twelve Factor App manifesto. Coming from an Operations background I really resonated with many of the topics and solutions covered by Twelve Factor. If you have not read the manifesto go check it out, I’ll wait… It’s pretty obvious there are twelve things you gotta do to build a Twelve Factor App, but in this post I’m going to focus on factor three, which mandates that application configuration be stored in the environment.


Go Advent Day 2 - Go 1.2 performance improvements

Contributed by   2013-12-02

Introduction 7 months, 1600 changes, well over 350 issues closed¹, and Go 1.2 is done. Go and install it now – it’s ok, it only takes a few minutes – I’ll wait. When Go 1.1 was released earlier in the year I did a series of posts (part 1, part 2, part 3) exploring the performance improvements the then current released provided. Go 1.1 was a herculean development effort, stretching some 14 months, and it brought with it equally impressive performance improvements.


Go Advent Day 1 - Go 1.2 is released

Contributed by   2013-12-01

Welcome Welcome to our first Go Advent Calendar. Gopher Academy is bringing you 25 blog posts about Go in 25 days and we’re starting from the top with a blog post from the Go team themselves. A new Go release It’s official: Go 1.2 was released this morning. The Go 1.2 development cycle started with a flurry of commits on the 14th of May. Shortly afterwards Andrew Gerrand posted a plan for the development cycle.


Go Advent 2013 starts next week

Contributed by   2013-11-25

Introduction Over at GopherAcademy, we’re getting in the Christmas spirit a little early this year. We’ve decided to do a Go Advent Calendar, highlighting cool Go projects every day from December 1st through the 25th. Other communities have done similar concepts in the past, and it’s a good way to highlight projects that people may not have seen. We’ve lined up a fantastic and varied set of contributors from around the Go multiverse who will bring you 25 Go related posts to fill your Christmas stockings.


SkyDNS (Or The Long Road to Skynet)

Contributed by   2013-10-10

SkyDNS and Skynet This article is in two sections. The first is the announcement of SkyDNS, a new tool to help manage service discovery and announcement. The second part of the article is a bit of a back story about why we needed this tool and how we got here. If you’re the impatient type, you can read the annoucement and description of SkyDNS and skip the rest. SkyDNS Today we’re releasing SkyDNS as an open source project on github.


Recursion and Tail Calls in Go

Contributed by   2013-07-23

Introduction This guest post is written by William Kennedy, author of the Going Go blog. I was looking at a code sample that showed a recursive function in Go and the writer was very quick to state how Go does not optimize for recursion, even if tail calls are explicit. I had no idea what a tail call was and I really wanted to understand what he meant by Go was not optimized for recursion.


Introducing Gopher Academy

Contributed by   2013-07-09

Introduction The people behind Gopher Academy have been active Go developers and contributors for several years. The Go ecosystem is vibrant, active, and full of smart people, but we always felt like it was missing a strong presence outside of Google. Recently, we were chatting about ways to promote Go to developers that either hadn’t yet heard of Go, or weren’t ready to take the leap. That’s when Gopher Academy was born.


Contributed by   0001-01-01