MCPcopy
hub / github.com/lonng/nano / Set

Method Set

session/session.go:151–156  ·  view source on GitHub ↗

Set associates value with the key in session storage

(key string, value interface{})

Source from the content-addressed store, hash-verified

149
150// Set associates value with the key in session storage
151func (s *Session) Set(key string, value interface{}) {
152 s.Lock()
153 defer s.Unlock()
154
155 s.data[key] = value
156}
157
158// HasKey decides whether a key has associated value
159func (s *Session) HasKey(key string) bool {

Callers 15

TestSession_HasKeyFunction · 0.80
TestSession_Float32Function · 0.80
TestSession_Float64Function · 0.80
TestSession_IntFunction · 0.80
TestSession_Int8Function · 0.80
TestSession_Int16Function · 0.80
TestSession_Int32Function · 0.80
TestSession_Int64Function · 0.80
TestSession_UintFunction · 0.80
TestSession_Uint8Function · 0.80
TestSession_Uint16Function · 0.80
TestSession_Uint32Function · 0.80

Calls

no outgoing calls

Tested by 15

TestSession_HasKeyFunction · 0.64
TestSession_Float32Function · 0.64
TestSession_Float64Function · 0.64
TestSession_IntFunction · 0.64
TestSession_Int8Function · 0.64
TestSession_Int16Function · 0.64
TestSession_Int32Function · 0.64
TestSession_Int64Function · 0.64
TestSession_UintFunction · 0.64
TestSession_Uint8Function · 0.64
TestSession_Uint16Function · 0.64
TestSession_Uint32Function · 0.64