MCPcopy
hub / github.com/gofiber/fiber / newState

Function newState

state.go:27–33  ·  state.go::newState

NewState creates a new instance of State.

()

Source from the content-addressed store, hash-verified

25
26// NewState creates a new instance of State.
27func newState() *State {
28 // Initialize the services state prefix using a hashed random string
29 return &State{
30 dependencies: sync.Map{},
31 servicePrefix: servicesStatePrefixHash,
32 }
33}
34
35// Set sets a key-value pair in the State.
36func (s *State) Set(key string, value any) {

Callers 15

Test_InitServicesFunction · 0.85
Test_StartServicesFunction · 0.85
Test_ShutdownServicesFunction · 0.85
Test_LogServicesFunction · 0.85
TestState_SetAndGetFunction · 0.85
TestState_GetStringFunction · 0.85
TestState_GetIntFunction · 0.85
TestState_GetBoolFunction · 0.85
TestState_GetFloat64Function · 0.85
TestState_GetUintFunction · 0.85
TestState_GetInt8Function · 0.85

Calls

no outgoing calls

Tested by 15

Test_InitServicesFunction · 0.68
Test_StartServicesFunction · 0.68
Test_ShutdownServicesFunction · 0.68
Test_LogServicesFunction · 0.68
TestState_SetAndGetFunction · 0.68
TestState_GetStringFunction · 0.68
TestState_GetIntFunction · 0.68
TestState_GetBoolFunction · 0.68
TestState_GetFloat64Function · 0.68
TestState_GetUintFunction · 0.68
TestState_GetInt8Function · 0.68