very rough first pass at Go encoding support.