Had to change this to `uint32(buf.Type)` in order to get it compiling and running on a 32bit (armv7l) machine, as the value is returned as a `int32` there. 

I do not know enough Go to be sure if this is the correct way to solve this. But it yields the correct result. (Tested on 64bit, too.)