From 49387732b523d8897f1e85f17a367939d981c335 Mon Sep 17 00:00:00 2001 From: Masayoshi Mizutani Date: Tue, 20 Feb 2024 08:30:48 +0900 Subject: [PATCH 1/2] Handle interface type properly in clone method --- clone.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clone.go b/clone.go index 2fa995e..4e66523 100644 --- a/clone.go +++ b/clone.go @@ -106,6 +106,9 @@ func (x *masq) clone(fieldName string, src reflect.Value, tag string) reflect.Va dst.Elem().Set(copied) return dst + case reflect.Interface: + return x.clone(fieldName, src.Elem(), tag) + default: dst := reflect.New(src.Type()) dst.Elem().Set(src) From 33947c4f77a27f5e3c93e1bb8b3207f79250e342 Mon Sep 17 00:00:00 2001 From: Masayoshi Mizutani Date: Tue, 20 Feb 2024 08:35:48 +0900 Subject: [PATCH 2/2] Use go 1.22 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 13d0bb4..32d11bc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/m-mizutani/masq -go 1.21 +go 1.22 require github.com/m-mizutani/gt v0.0.7