The Best Go Content on the Internet


Predicting genetic diseases with CloudForest

Contributed by

CloudForest is a machine learning project dedicated to the construction of Random Forests built entirely in Go. It was created by Ryan Bressler. Random Forests are a machine learning algorithm based around the construction of many single classification trees, each splitting both the training set and the features available to train the model randomly. Each single tree is different from the others due to this random split and the ensemble of all the trees together is able to classify the data better than any single tree could do by itself.

Read more...

Teaching Go to complete beginners

Contributed by

TL;DR How about arranging a GoBridge workshop for beginners as your New Year’s resolution? Teach Go to complete beginners Being a good Go programmer is definitely good. One of the things that bridges the gap between a good and a great programmer, is knowing your stuff. The Feynman Technique to learning things suggests that the best way to know something, is to be able to explain it to a person new in the field.

Read more...

Implementing Git's Compression In Go

Contributed by

Implementing Git’s Compression in Go Git + Go = Gitgo Gitgo is a pure Go library for core Git functions. As a ground-up implementation with no C bindings, it implements the entire structure of Git repositories from scratch. This includes an arcane part of Git that every Git user uses on a daily basis: packfiles. Packfiles are a custom-designed file format that Git uses internally for compressing and storing binary diffs.

Read more...

Enigma emulator in Go

Contributed by

Introduction This story begins the day after I got home after giving a talk at the wonderful DevFest Siberia. Shortly after my weekly fix of Westworld, a strange nagging feeling appeared — like the one you get from unpaid bills, a postcard that you forgot to send, or a particularly nasty API endpoint that you were supposed to refactor a year ago but then, well, I mean, it works, right? Then I remembered.

Read more...

Gleam: Distributed Map Reduce for Golang

Contributed by

After developing Glow last year, I came to realize the two limitations of Go for distributed data processing. First, generics are needed. Of course, we can use reflection. But it is noticeably slower, to the point that I do not want to show the performance numbers. Second, dynamic remote code execution is also needed if we want to dynamically adjust the execution plan. We could pre-build all the execution DAGs first and choose one of them during run time.

Read more...

So you want to expose Go on the Internet

Contributed by

Back when crypto/tls was slow and net/http young, the general wisdom was to always put Go servers behind a reverse proxy like NGINX. That’s not necessary anymore! At Cloudflare we recently experimented with exposing pure Go services to the hostile wide area network. With the Go 1.8 release, net/http and crypto/tls proved to be stable, performant and flexible. However, the defaults are tuned for local services. In this articles we’ll see how to tune and harden a Go server for Internet exposure.

Read more...

Advanced Encoding and Decoding Techniques in Go

Contributed by

Advanced Encoding and Decoding Techniques Go’s standard library comes packed with some great encoding and decoding packages covering a wide array of encoding schemes. Everything from CSV, XML, JSON, and even gob - a Go specific encoding format - is covered, and all of these packages are incredibly easy to get started with. In fact, most of them don’t require you to add any code at all; You simply plug in your data and it spits out encoded data.

Read more...

Abusing Go Syntax to Create a Domain-Specific Language

Contributed by

Go is often the tool of choice for building the guts of a high-performance system, but Go was also designed with some features that are great for building high-level abstractions. You don’t need to switch gears to a dynamic language like Ruby or Python to enjoy pleasant APIs or declarative syntax. It’s an increasingly popular choice to express an API as a DSL - a Domain-Specific Language. A DSL is a language-within-a-language that is compiled or interpreted inside a host language- in our case, Go.

Read more...

Writing good unit tests for SOLID Go

Contributed by

Dave Cheney covered how interfaces are used to design good Go code in his SOLID Go Design talk and blog post. In this blog post, we are going to focus on some tips on how to write unit tests for that beautiful SOLID code. The primary objectives for our test builds are to: Increase the confidence in our code. Otherwise, the test code is just dead weight. Be fast. Who likes waiting 15 minutes for the tests to pass?

Read more...

Finding good packages in the Sea of Open-Source

Contributed by

So far we’ve seen different ways to use Go to build a variety of applications, from versioning your data pipelines to building your own BBQ grill controller. But often times you’ll be looking to reuse the code from others in order to focus on what your code should do and not reinvent the wheel. How do you know which package to use? And when should you use a package versus writing your own?

Read more...