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

Function yamlMappingValue

internal/homeplugins/sync.go:574–586  ·  view source on GitHub ↗
(node *yaml.Node, key string)

Source from the content-addressed store, hash-verified

572}
573
574func yamlMappingValue(node *yaml.Node, key string) *yaml.Node {
575 if node == nil || node.Kind != yaml.MappingNode {
576 return nil
577 }
578 for i := 0; i+1 < len(node.Content); i += 2 {
579 keyNode := node.Content[i]
580 if keyNode == nil || keyNode.Value != key {
581 continue
582 }
583 return node.Content[i+1]
584 }
585 return nil
586}
587
588var newPluginStoreClient = func(cfg *config.Config) sdkpluginstore.Client {
589 client := &http.Client{}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected