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 }