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

Function extractList

internal/tui/client.go:323–337  ·  view source on GitHub ↗

extractList pulls an array of maps from a wrapper object by key.

(wrapper map[string]any, key string)

Source from the content-addressed store, hash-verified

321
322// extractList pulls an array of maps from a wrapper object by key.
323func extractList(wrapper map[string]any, key string) ([]map[string]any, error) {
324 arr, ok := wrapper[key]
325 if !ok || arr == nil {
326 return nil, nil
327 }
328 raw, err := json.Marshal(arr)
329 if err != nil {
330 return nil, err
331 }
332 var result []map[string]any
333 if err := json.Unmarshal(raw, &result); err != nil {
334 return nil, err
335 }
336 return result, nil
337}
338
339// GetDebug fetches the current debug setting.
340func (c *Client) GetDebug() (bool, error) {

Callers 2

GetAuthFilesMethod · 0.85
getWrappedKeyListMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected