MCPcopy
hub / github.com/yusing/godoxy / SetState

Function SetState

internal/config/state.go:96–103  ·  view source on GitHub ↗
(state config.State)

Source from the content-addressed store, hash-verified

94}
95
96func SetState(state config.State) {
97 stateMu.Lock()
98 defer stateMu.Unlock()
99
100 cfg := state.Value()
101 config.ActiveState.Store(state)
102 homepagetypes.ActiveConfig.Store(&cfg.Homepage)
103}
104
105func HasState() bool {
106 return config.ActiveState.Load() != nil

Callers 2

LoadFunction · 0.85
ReloadFunction · 0.85

Calls 1

ValueMethod · 0.65

Tested by

no test coverage detected