func removeMagicByteAndSchemaIdPrefix(configuration Configuration, messageData []byte, keyOrValue string) []byte {
	if useKafkaAvroDeserializer(configuration, keyOrValue) {
		return messageData[5:]
	}
	return messageData
}
Account for proprietary 5-byte prefix before the Avro payload:
https://docs.confluent.io/platform/current/schema-registry/serdes-develop/index.html#wire-format
package kafka
import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
	"github.com/linkedin/goavro/v2"
)
func i32tob(val uint32) []byte {
	r := make([]byte, 4)
	for i := uint32(0); i < 4; i++ {
		r[3-i] = byte((val >> (8 * i)) & 0xff)
	}
	return r
}