Category: Go rss

Posts

12 October / / go

Listening on sockets allows an application to connect to other devices. We use this technique daily visiting websites, or connecting to a series of services via the HTTP(s) protocol. Go comes with a standard library to manage HTTP connections, but, from time to time, that’s not the most effective way to exchange data between two or more systems. This post will show you how to listen on sockets handling multiple connections.

10 October / / go

Multi-threading has always been the novice programmer’s scarecrow, and even professionals might have never really written asynchronous code before, for a number of reasons: first of all because it’s more complicated to think in an asynchronous world! Golang has multi-threading in its heart, and this is a big deal because it simplifies a number of things.

31 December / / go
Most of the programming languages support multiple ways of handling errors, for example try-catching, value-checking, popping errors in the stack. Learning go I found the approach of this language is way different: you can let a function return an error (and eventual result(s)), thus not throwing any kind of error, and not returning “special values” like, for example, PHP’s json_decode (which can return true, false, NULL, stdClass or even an array!