Fix go functions 

Basically none of the functions are ending at the functions closing brackets. Also the snippet for struct had a wrong number.