diff --git a/README b/README index ae53ce7..eccb62e 100644 --- a/README +++ b/README @@ -61,13 +61,13 @@ Usage: c.Set("foo", foo, 0) ... x, _ := c.Get("foo") - foo := x.(MyStruct) + foo := x.(*MyStruct) fmt.Println(foo.Num) ... foo.Num++ ... x, _ := c.Get("foo") - foo := x.(MyStruct) + foo := x.(*MyStruct) foo.Println(foo.Num) // will print: diff --git a/cache.go b/cache.go index 04978df..e12eed3 100644 --- a/cache.go +++ b/cache.go @@ -72,13 +72,13 @@ import ( // c.Set("foo", foo, 0) // ... // x, _ := c.Get("foo") -// foo := x.(MyStruct) +// foo := x.(*MyStruct) // fmt.Println(foo.Num) // ... // foo.Num++ // ... // x, _ := c.Get("foo") -// foo := x.(MyStruct) +// foo := x.(*MyStruct) // foo.Println(foo.Num) // // will print: