Encode to and decode from bytecode easily with abi package. Usage is similar to Solidity's abi.encode, abi.encodePacked, and abi.decode functions.
go get github.com/omnes-tech/abiEncode functions:
EncodeEncodePackedEncodeSelectorEncodeWithSignatureEncodeWithSelector
Decode functions:
DecodeDecodePackedDecodeWithSignatureDecodeWithSelector