MCPcopy Create free account
hub / github.com/Xenov-X/csbot / interpolateString

Method interpolateString

workflow/executor.go:649–659  ·  view source on GitHub ↗

interpolateString replaces ${action_name} variables with outputs

(s string)

Source from the content-addressed store, hash-verified

647
648// interpolateString replaces ${action_name} variables with outputs
649func (e *Executor) interpolateString(s string) string {
650 result := s
651
652 // Find all ${...} patterns
653 for actionName, output := range e.outputs {
654 placeholder := fmt.Sprintf("${%s}", actionName)
655 result = strings.ReplaceAll(result, placeholder, output)
656 }
657
658 return result
659}
660
661// executeBOFString executes a BOF with string arguments
662func (e *Executor) executeBOFString(ctx context.Context, client *csclient.Client, beaconID string, action Action) (string, error) {

Callers 1

interpolateActionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected