SetImmutable fills the session with an entry "value", based on its "key". Unlike `Set`, the output value cannot be changed by the caller later on (when .Get) An Immutable entry should be only changed with a `SetImmutable`, simple `Set` will not work if the entry was immutable, for your own safety. U
(key string, value interface{})
| 534 | // Use it consistently, it's far slower than `Set`. |
| 535 | // Read more about muttable and immutable go types: https://stackoverflow.com/a/8021081 |
| 536 | func (s *Session) SetImmutable(key string, value interface{}) { |
| 537 | s.set(key, value, true) |
| 538 | } |
| 539 | |
| 540 | // SetFlash sets a flash message by its key. |
| 541 | // |