code: func RecoverPubkey(msg []byte, sig []byte) ([]byte, error) {
  	if len(msg) != 32 {
  		return nil, ErrInvalidMsgLen
  	}
  	if err := checkSignature(sig); err != nil {
  		return nil, err
  	}
  
  	var (
  		pubkey  = make([]byte, 65)
  		sigdata = (*C.uchar)(unsafe.Pointer(&sig[0]))
  		msgdata = (*C.uchar)(unsafe.Pointer(&msg[0]))
  	)
  	if C.secp256k1_ext_ecdsa_recover(context, (*C.uchar)(unsafe.Pointer(&pubkey[0])), sigdata, msgdata) == 0 {
  		return nil, ErrRecoverFailed
  	}
  	return pubkey, nil
  }
docs: // RecoverPubkey returns the public key of the signer.
  // msg must be the 32-byte hash of the message to be signed.
  // sig must be a 65-byte compact ECDSA signature containing the
  // recovery id as the last element.