MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / toggleBool

Method toggleBool

internal/tui/config_tab.go:169–181  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

167}
168
169func (m configTabModel) toggleBool(idx int) tea.Cmd {
170 return func() tea.Msg {
171 f := m.fields[idx]
172 current := f.value == "true"
173 newValue := !current
174 errPutBool := m.client.PutBoolField(f.apiPath, newValue)
175 return configUpdateMsg{
176 path: f.apiPath,
177 value: newValue,
178 err: errPutBool,
179 }
180 }
181}
182
183func (m configTabModel) submitEdit(idx int, newValue string) tea.Cmd {
184 return func() tea.Msg {

Callers 1

handleNormalKeyMethod · 0.95

Calls 1

PutBoolFieldMethod · 0.80

Tested by

no test coverage detected