There is an issue with /usr/share/terminfo/x/xterm-256color that's preventing it from being used (not sure what exactly, I didn't dig too far). I fixed it by using infocmp to dump the terminfo from my mac.
I put the xterm-256color.terminfo file that resulted (see here for my copy, YMMV) into /boot/config/ and added the following to my go script:
# fix xterm-256color terminfo
tic /boot/config/xterm-256color.terminfo