MCPcopy Index your code
hub / github.com/kataras/iris / SetImmutable

Method SetImmutable

sessions/session.go:536–538  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

534// Use it consistently, it's far slower than `Set`.
535// Read more about muttable and immutable go types: https://stackoverflow.com/a/8021081
536func (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//

Callers 1

NewAppFunction · 0.45

Calls 1

setMethod · 0.95

Tested by

no test coverage detected