From 3433c874fadae7e9fd497f070ee894f347df75a2 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sat, 15 Oct 2022 09:21:14 +0200 Subject: [PATCH] fix pathfinder panic --- pathfind.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pathfind.go b/pathfind.go index 4c19075..8024f57 100644 --- a/pathfind.go +++ b/pathfind.go @@ -72,6 +72,10 @@ func setValueUsingPath[D any](obj D, keyWithDots string, newValue string) error } + if v.Kind() == reflect.Invalid { + return newInvalidPathError(keyWithDots) + } + for v.Kind() == reflect.Ptr { v = v.Elem() } -- GitLab