MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / injectCommandWithMessage

Function injectCommandWithMessage

mob.go:472–482  ·  view source on GitHub ↗
(command string, message string)

Source from the content-addressed store, hash-verified

470}
471
472func injectCommandWithMessage(command string, message string) string {
473 placeHolders := strings.Count(command, "%s")
474 if placeHolders > 1 {
475 say.Error(fmt.Sprintf("Too many placeholders (%d) in format command string: %s", placeHolders, command))
476 Exit(1)
477 }
478 if placeHolders == 0 {
479 return fmt.Sprintf("%s %s", command, message)
480 }
481 return fmt.Sprintf(command, message)
482}
483
484func executeCommandsInBackgroundProcess(commands ...string) (err error) {
485 cmds := make([]string, 0)

Callers 3

getVoiceCommandFunction · 0.85
getNotifyCommandFunction · 0.85
openCommandForFunction · 0.85

Calls 1

ErrorFunction · 0.92

Tested by

no test coverage detected