Notable changes between releases.
- Update Go module dependency and configure changelog generator
- Allow
Session
to store values with specified type (V
) (i.e. generics) (#21)Session
state is now amap[string]V
instead of amap[string]any
- Update
Set
,Get
, andGetOk
methods to use generic typeV
- Change
Session
toSession[V any]
to specify the type of value stored in the Session - See updated usage docs for examples
- Change
Store
toStore[V any]
to specify the type of value stored in sessions - Change
NewCookieStore
toNewCookieStore[V any]
to specify the type of value stored in sessions
- Change
DefaultCookieConfig
to useSameSiteLaxMode
(#22)
- Change
CookieStore
and its fields to be non-exported (#19)- Change
NewCookieStore
to require a*CookieConfig
and return aStore
- Rename
Config
struct toCookieConfig
- Add
DefaultCookieConfig
andDebugCookieConfig
convenience variables
- Change
- Change the
Session
fieldValues
to be non-exported (#18)- Add
Session
Set
method to set a key/value pair - Add
Session
Get
method to get a value for a given key - Add
Session
GetOk
to get a value for a given key and whether the key exists in the map
- Add
- Remove cookie
Config
field fromSession
(#17)
- Update minimum Go version from v1.17 to v1.18 (#15)
- Fix
go.mod
to includegorilla/securecookie
(#7)
- Initial release
- Require Go v1.11+