MCPcopy Create free account
hub / github.com/cogentcore/core / DeleteJob

Method DeleteJob

shell/shell.go:432–439  ·  view source on GitHub ↗

DeleteJob deletes the given job and returns true if successful,

(cmdIO *exec.CmdIO)

Source from the content-addressed store, hash-verified

430
431// DeleteJob deletes the given job and returns true if successful,
432func (sh *Shell) DeleteJob(cmdIO *exec.CmdIO) bool {
433 idx := slices.Index(sh.Jobs, cmdIO)
434 if idx >= 0 {
435 sh.Jobs = slices.Delete(sh.Jobs, idx, idx+1)
436 return true
437 }
438 return false
439}
440
441// JobIDExpand expands %n job id values in args with the full PID
442// returns number of PIDs expanded

Callers 1

ExecMethod · 0.95

Calls 2

DeleteMethod · 0.65
IndexMethod · 0.45

Tested by

no test coverage detected