From 47b9887827c2062186a15eac78ae0be07142f046 Mon Sep 17 00:00:00 2001 From: apxamccallum <115504488+apxamccallum@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:34:29 -0800 Subject: [PATCH] fix scope issue Signed-off-by: apxamccallum <115504488+apxamccallum@users.noreply.github.com> --- doc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc.go b/doc.go index 946bf5c..1511b1a 100644 --- a/doc.go +++ b/doc.go @@ -139,8 +139,8 @@ a need to type-assert data when retrieving it. We'll use the Person struct we re // Retrieve our struct and type-assert it val := session.Values["person"] - var person = &Person{} - if person, ok := val.(*Person); !ok { + person, ok := val.(*Person) + if !ok { // Handle the case that it's not an expected type }