MCPcopy Create free account
hub / github.com/devfeel/dotweb / Set

Method Set

session/sessionstate.go:45–51  ·  view source on GitHub ↗

Set key-value to current state

(key, value interface{})

Source from the content-addressed store, hash-verified

43
44// Set key-value to current state
45func (state *SessionState) Set(key, value interface{}) error {
46 state.lock.Lock()
47 defer state.lock.Unlock()
48 state.values[key] = value
49 return state.store.SessionUpdate(state)
50
51}
52
53// Get value by key in current state
54func (state *SessionState) Get(key interface{}) interface{} {

Callers

nothing calls this directly

Calls 1

SessionUpdateMethod · 0.65

Tested by

no test coverage detected