recordedExecer implements agentexec.Execer by recording every invocation and delegating to a real shell command built from a caller-supplied mapping of subcommand → shell script body.
| 27 | // invocation and delegating to a real shell command built from a |
| 28 | // caller-supplied mapping of subcommand → shell script body. |
| 29 | type recordedExecer struct { |
| 30 | mu sync.Mutex |
| 31 | commands [][]string |
| 32 | // scripts maps a subcommand keyword (e.g. "up", "screenshot") |
| 33 | // to a shell snippet whose stdout will be the command output. |
| 34 | scripts map[string]string |
| 35 | } |
| 36 | |
| 37 | func (r *recordedExecer) record(cmd string, args ...string) { |
| 38 | r.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected