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

Method String

base/exec/cmd.go:25–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func (c *CmdIO) String() string {
26 if c.Cmd == nil {
27 return "<nil>"
28 }
29 str := ""
30 if c.Cmd.ProcessState != nil {
31 str = c.Cmd.ProcessState.String()
32 } else if c.Cmd.Process != nil {
33 str = fmt.Sprintf("%d ", c.Cmd.Process.Pid)
34 } else {
35 str = "no process info"
36 }
37 str += " " + c.Cmd.String()
38 return str
39}
40
41// NewCmdIO returns a new [CmdIO] initialized with StdIO settings from given Config
42func NewCmdIO(c *Config) *CmdIO {

Callers 1

ExecMethod · 0.95

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected