From 8349b718afeaad2b8058a92a53e8c92fa49f29a3 Mon Sep 17 00:00:00 2001
From: Volker Schukai <volker.schukai@schukai.com>
Date: Sun, 17 Dec 2023 20:13:50 +0100
Subject: [PATCH] fix: wrong type check #42

---
 job.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/job.go b/job.go
index 0d15cee..262cdc5 100644
--- a/job.go
+++ b/job.go
@@ -255,7 +255,7 @@ func (j *Job[T]) Execute(ctx context.Context) (RunGenericResult, error) {
 		newLog.IsSuccessful = true
 		newLog.ExitCode = 0
 	} else {
-		switch v := any(r.Data).(type) {
+		switch v := any(&r.Data).(type) {
 		case GetResultAndError:
 			newLog.ErrorMsg, newLog.ExitCode = v.GetError()
 		}
@@ -276,7 +276,7 @@ func (j *Job[T]) Execute(ctx context.Context) (RunGenericResult, error) {
 
 	newLog.EndTime = time.Now()
 
-	switch v := any(r.Data).(type) {
+	switch v := any(&r.Data).(type) {
 	case GetResultAndError:
 		newLog.Result = v.GetResult()
 	}
-- 
GitLab