MCPcopy Index your code
hub / github.com/nikivdev/go / formatCommand

Function formatCommand

cli/spec/main.go:819–826  ·  view source on GitHub ↗
(bin string, args []string)

Source from the content-addressed store, hash-verified

817}
818
819func formatCommand(bin string, args []string) string {
820 parts := make([]string, 0, len(args)+1)
821 parts = append(parts, shellQuote(bin))
822 for _, arg := range args {
823 parts = append(parts, shellQuote(arg))
824 }
825 return strings.Join(parts, " ")
826}
827
828func shellQuote(arg string) string {
829 if arg == "" {

Callers 1

runExecFunction · 0.85

Calls 1

shellQuoteFunction · 0.85

Tested by

no test coverage detected