GoAsm usually specifies which line number is at fault. In this case I believe it is the first line. The error message most likely was "Use square brackets to address memory, ADDR or OFFSET to get address". This is one of the differences between GoAsm and MASM, but it is the other way around, MASM allows the second code snip above, GoAsm requires the first.
Given that you are using OFFSET, I suspect that rax is the problem since you have not specifed either /x86 or /x64 on the command line (in which case rax is not recognized as a register, but taken as a label, which gives the error since either [rax] or ADDR rax would be required in that case).