Categories golang

13 posts

Auto Added by WPeMatico

5 Gotchas of Defer in Go (Golang) — Part III

5 More Gotchas of Defer in Go — Part III Gotchas and tricks about defer. This article is more about tricks rather than gotchas of defer. Read the following posts from this series to discover more gotchas and tricks about defer: Part I Part II Part III (this) Part IV (incoming — the last one) If you don’t know how […]

How I built an image proxy server to anonymise images in twenty minutes

You can find the source code for this post at Let’s say you want to anonymise images by hiding any detected face, just by tweaking the src attribute of the tag in HTML. If we build a proxy server that does the work for us, we can prepend that server’s […]

Why are there nil channels in Go?

A practical example This blog post is complementary to episode 26 of justforfunc which you can watch right below. Everybody that has written some Go knows about channels. Most of us also know that the default value for channels is nil. But not many of us know that this nil […]

Let’s Make an NTP Client in Go

While doing some research on network programming, I came across this blog post titled from Packt Publishing. Let’s Make an NTP Client in Go was originally published in Learning the Go Programming Language on Medium, where people are continuing the conversation by highlighting and responding to this story. GurupriyanGurupriyan is […]

Autocomplete engine in Go: let’s build it

Some time ago I worked on a small autocomplete web service for fun and curiosity. Part of it consists pretty much of what I’m going to talk about in this post. We’re gonna build a small completion suggester in Go. A couple of assumptions I’ll have for this experiment are: we don’t […]

Announcing Procs, the Simple Process Management Library for Go

I’m a big fan of using processes in programs to implement functionality. There are often times existing programs that do the intended behavior and do it well. Unfortunately, integrating command line applications into other programs can be painful. There are times you want to expose output from the underlying commands, […]

5 Gotchas of Defer in Go (Golang) — Part II

5 More Gotchas of Defer in Go — Part II Protect yourself from basic defer gotchas. For beginners. We’re continuing our journey of defer gotchas. #2—Scope ate my param This is actually a scope gotcha, however, I wanted to show you how it behaves with defer and . #3—Quick to run the params Params passed to […]