How to read a Reader twice

Some time ago I read about TeeReader but to be fair, I didn’t give it that much thought. However, few month back I saw a video by @francesc and his nice use case and I wrote down a new item in my mental TODO list about things I wanted to use. Last week I had the chance to do it; we have a service that requires reading a request body to check for a Status field and also it requires to store the raw request.
Read more →

Closing 2016, a list of talks I gave

Thanks @rais38 for the photo! We are almost at the end of January but I didn’t want to end the first month of the year without doing a small recap of the talks I gave last year. When I moved to Spain at the end of 2015 I said to myself that I didn’t want to forget the little English I knew so I needed to force myself to keep traveling outside of Spain and to do some public speaking.
Read more →

Go introduction at Shopa

Here at Shopa we use Go for some services but we use a lot of Rails as well so not everybody needs to know Go. This is why I’ve decided to do a small introduction to it in one of our workshops. The slides are mainly examples with a little bit of history around the Go world. If you find them useful, feel free to grab them here: https://github.com/agonzalezro/slides/tree/master/go Probably I’ve forgotten about something but it was just a 1 hour and a half presentation.
Read more →

IoT hackathon with Intel Edison and Go

I spent last weekend in a hackathon organised by Intel to show their Intel Edison platform. I can just say that it was awesome, the quality of the projects, the prizes, the food, the freebies (yes, they gave us an Intel Edison)… But this post is not about that, I want to explain my project and how I made Golang work in an Intel Edison thanks to gobot. As you are already aware, Go easily supports cross compiling creating a binary that you can use in your other devices.
Read more →

The well deserved Golang UK conference is here

Hi mum & dad (my 2 followers on the blog?) some friends, (Johanna, Sam & David) and myself have decided to organize a Go conference in the UK the next August 21. He had opened the blind bird at the beginning of the week and we are already close to finish those cheap tickets, so hurry up and buy a ticket. We can see for the call for papers already received that the quality of the talks is going to be awesome, but don’t miss your opportunity as send us a paper before May 31st.
Read more →

Graph your meetup.com group with Neo4J and some Go

Last days I’ve been spending sometime in a small project for fun. Sadly I couldn’t do anything for production so I hacked gotagmee which is a tiny thingy that will created some goroutines to get all the members in a meetup.com group with their interests and store them in a Neo4J DB as Member or Topic entities with their respective relations. I wrote this because I wanted to get the data, but then I realised that this piece of code is pretty neat (check the github repo for the original):
Read more →

How to manage multiple errors in Go

Let me start with a disclaimer, I don’t really know if this is a pattern that must be followed or it’s just a weird idea coming out of my head. The second disclaimer is that I am pretty sure that I am not the only mind that thought about this, but I didn’t see it in use in any place. Why? Error handling in Go has his advantages and disadvantages, for me, the most important disadvantage is the “weird” way of checking the error just after the line that can raise it.
Read more →

12 Go Best Practices

Last Monday I had the chance to see @francesc talking on the Go London User Group. His talk was about best practices (and advices) when you are programming in Go. Summarising it a little bit, I would say that some of the cases explained there are things that you are going to finish doing even without knowing that you are doing “best practices”, but they are other examples that are incredible useful and clever & I would love to assist to this conference few months ago.
Read more →