Go Lang

How to make email work better email2issue

How to make email work better email2issue

The problem:

We are using a bug tracking system, like most software development companies. Creating an issue is quite simple. Open bug tracking system, fill some inputs, upload attachments – done. The issue is created. Sometimes an issue is described with multiple attachments (screenshots). A bug tracking system allows us to embed images into a description. All issues come from users in the form of an email.

Binary compression still alive – golang binary compression.

Binary compression still alive – golang binary compression.

In the ancient times, when I was coding mostly in Pascal – size did matter. People were using RAR to shave couple kilobytes from archives, and having 2mb executable was better then having 4mb executable file. In that beautiful time we used  UPX – I wasn’t aware that this project is still alive, and works nicely with binaries create bo go lang.

Ultimate Packer for eXecutables
Copyright (C) 1996 - 2017
UPX 3.94        Markus Oberhumer, Laszlo Molnar & John Reiser   May 12th 2017

File size Ratio Format Name
-------------------- ------ ----------- -----------
11512772 -> 3547792 30.82% macho/amd64 main

Packed 1 file.

Checking JPEG image dimension from partial headers

The goal was to read image dimensions from an image file. Pretty easy task with standard “ image ” library and DecodeConfig. The tricky part was – the file wasn’t completed – I had only the beginning of the file. I tried to decode headers by myself. I didn’t find an exact recipe in GO and found many people looking for correct answers in many languages.

Using Google Cloud storage with AWS libraries in GO LANG

Using Google Cloud storage with AWS libraries in GO LANG

Google Cloud storage  it’s Google answer to [Amazon S3][1] service. As long one of them is very popular 😉 Second wasn’t so successful amongst developers due to quite complex processes around service. Amazon is super simple, and developer friendly – Google… well not so easy. So the questions – why you may consider using GS instead of well documented, and super easy S3. Not many people realise but Google Cloud Storage is actually cheaper . The other reason to use Google Storage is having different provider as a backup solution. Anyway – let’s show how easy is to use GS with existing S3 libraries.

How update Go library

How update Go library

Installation of go library is pretty simple: go get github.com/garyburd/redigo/redis

From time to time, you want to get fresh version of it. If you run that command again it will NOT update the library – because it’s already there. To update it you need to use the -u switch:

go get -u github.com/garyburd/redigo/redis