(state config.State)
| 94 | } |
| 95 | |
| 96 | func 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 | |
| 105 | func HasState() bool { |
| 106 | return config.ActiveState.Load() != nil |