func CloneMessage(m interface{}) (interface{}, error) {
	pm, ok := m.(proto.Message)
	if !ok {
		return nil, fmt.Errorf("value to clone is not a proto.Message: %T; use a custom cloner", m)
	}
	return proto.Clone(pm), nil
}
CloneMessage returns a copy of the given value.
package internal
import (
	"context"
	"fmt"
	"reflect"
	"github.com/golang/protobuf/proto"
	"github.com/jhump/protoreflect/dynamic"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)
func CopyMessage(out, in interface{}) error {
	pmIn, ok := in.(proto.Message)
	if !ok {
		return fmt.Errorf("value to copy is not a proto.Message: %T; use a custom cloner", in)
	}
	pmOut, ok := out.(proto.Message)
	if !ok {
		return fmt.Errorf("destination for copy is not a proto.Message: %T; use a custom cloner", in)
	}
	pmOut.Reset()
	return dynamic.TryMerge(pmOut, pmIn)
}