diff --git a/internal/api_to_rpc/copy.go b/internal/api_to_rpc/copy.go index 95d110c60..5052afef9 100644 --- a/internal/api_to_rpc/copy.go +++ b/internal/api_to_rpc/copy.go @@ -7,7 +7,10 @@ import ( ) func CopyAny(from, to interface{}) { - t := reflect.ValueOf(to).Elem() + t := reflect.ValueOf(to) + if t.Kind() == reflect.Ptr { + t = t.Elem() + } if !t.CanSet() { return }