From 91924423e170b1879832621d5379aabe9d49b35a Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sat, 16 Sep 2023 12:46:39 +0200
Subject: [PATCH] fix: pointer should retur pointer not element #11

---
 get.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/get.go b/get.go
index 90c2b1c..8af7435 100644
--- a/get.go
+++ b/get.go
@@ -60,9 +60,9 @@ func GetValue[D any](obj D, keyWithDots string) (any, error) {
 		return nil, newInvalidPathError(keyWithDots)
 	}
 
-	for v.Kind() == reflect.Ptr {
-		v = v.Elem()
-	}
+	//for v.Kind() == reflect.Ptr {
+	//	v = v.Elem()
+	//}
 
 	// check if v can interface
 	if !v.CanInterface() {
-- 
GitLab