MCPcopy Index your code
hub / github.com/coder/agentapi / loadScript

Function loadScript

e2e/echo.go:33–45  ·  view source on GitHub ↗
(scriptPath string)

Source from the content-addressed store, hash-verified

31}
32
33func loadScript(scriptPath string) ([]ScriptEntry, error) {
34 data, err := os.ReadFile(scriptPath)
35 if err != nil {
36 return nil, fmt.Errorf("failed to read script file: %w", err)
37 }
38
39 var script []ScriptEntry
40 if err := json.Unmarshal(data, &script); err != nil {
41 return nil, fmt.Errorf("failed to parse script JSON: %w", err)
42 }
43
44 return script, nil
45}
46
47func runEchoAgent(scriptPath string) {
48 script, err := loadScript(scriptPath)

Callers 1

runEchoAgentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected