Updated for go 1.1 and fixed formatting