Fixed golang build errors, added result types