MCPcopy
hub / github.com/apache/answer / Enable

Method Enable

plugin/plugin.go:186–202  ·  view source on GitHub ↗
(name string, enabled bool)

Source from the content-addressed store, hash-verified

184}
185
186func (m *statusManager) Enable(name string, enabled bool) {
187 m.lock.Lock()
188 defer m.lock.Unlock()
189 if !enabled {
190 m.status[name] = enabled
191 return
192 }
193 m.status[name] = enabled
194
195 for _, slugName := range coordinatedCaptchaPlugins(name) {
196 m.status[slugName] = false
197 }
198
199 for _, slugName := range coordinatedCDNPlugins(name) {
200 m.status[slugName] = false
201 }
202}
203
204func (m *statusManager) IsEnabled(name string) bool {
205 if status, ok := m.status[name]; ok {

Callers 2

setupTestEnvironmentFunction · 0.80
UpdatePluginStatusMethod · 0.80

Calls 2

coordinatedCDNPluginsFunction · 0.85

Tested by 1

setupTestEnvironmentFunction · 0.64