func toType[T any]()

in app/pubsub-integration/avro/avro.go [74:80]


func toType[T any](data interface{}, valueType T) (T, error) {
	value, ok := data.(T)
	if !ok {
		return valueType, fmt.Errorf("the type of %v is %v, but %v is expected", data, reflect.TypeOf(data), reflect.TypeOf(valueType))
	}
	return value, nil
}